我下载的VSFlexGrid8带注册机的,用rs记录集填充VSFlexGrid后最多只显示101行,很奇怪呀
下面是部分代码  
  sSql = "select * from table"
  Rs.CursorLocation = adUseClient
  Rs.Open sSql, Conn
  If Not (Rs.EOF And Rs.BOF) Then
     Set VSFlexGrid.DataSource = Rs
   Else
     VSFlexGrid.Rows = 2
     VSFlexGrid.Cols = 10
     VSFlexGrid.Clear
  End If

解决方案 »

  1.   

    VSFlexGrid.VirtualData = False具体内容如下VirtualData PropertyReturns or sets whether all data is fetched from the data source at once or as needed.Syntax[form!]VSFlexGrid.VirtualData[ = {True | False} ]ResThe VirtualData property is relevant only when the grid is bound to a recordset.If VirtualData is set to True, data is retrieved from the data source only when it is needed (for displaying or reading its value, for example). This saves time and memory because the data is retrieved from the recordset in small chunks, so the control is never tied up reading large amounts of data that are not immediately needed.The example below configures binding so that data is retrieved from the data source only when it is needed:    Private Sub Form_Load()        fg.VirtualData = True        fg.DataMode = flexDMBound        fg.DataSource = Data1.Recordset            End SubIf VirtualData is set to False, the entire dataset is read from the data source into memory, all at once. This process may be slow, especially if the data source is large (over about 5,000 records).See also the DataSource and DataMode properties.Data TypeBoolean
      

  2.   

    sSql = "select * from table"=======
    这个table要加[]号吧
    先msgbox 看看到底查到几条记录
      

  3.   

    sSql = "select * from tabaas"
    tabaas表中有几千条记录,奇怪的是VSFlexGrid显示结果中确实有与表tabass中相同的行数,但只有前101行有内容,后面其它行全都是空的,但把VSFlexGrid控件换成MSHFlexGrid一切正常,很奇怪
      

  4.   

    只寫這一句看行不行
    sSql = "select * from table"
    Rs.CursorLocation = adUseClient
    Rs.Open sSql, Conn
    Set VSFlexGrid.DataSource = Rs如果還不行,控件沒有注冊??
      

  5.   

    哈哈,自己解决啦
    可是很奇怪,只是将这句
    Rs.CursorLocation = adUseClient
    去掉就好了! 奇怪
    有谁知道为什么吗?
      

  6.   

    我认为这是VS的一个缺点,MSFLEX就不存在。其原因在于你关闭了数据集rs.Close,去掉此句即可
      

  7.   

    楼上这些都是错的!!!!!!!!!!!!!!!!!!!!!!!!!!!!将virtualdata属性设成false就行了.把分全部给我...
      

  8.   

    I_Love_VB2003分全给你,有什么用啊!