How To Display Recordset 'Pages' in an MSFlexGrid Control Without Loading Entire Recordset into the Grid (254117)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q254117 SUMMARY
Generally it is not a good idea to populate a Grid control with more than a 1000 rows, but there might be times when it is necessary to populate a Grid with many times this number. When you do this, however, your application takes a large performance hit at the beginning, sometimes taking several minutes after the recordset is loaded to actually populate the grid.
This article demonstrates one way to display thousands of records without having to actually load them all at the same time. The is done by "paging" through the recordset and only displaying the number of records that corresponds to the number of rows visible in the grid. This particular sample uses the MSFlexGrid control and is intended to show how to handle a read-only grid. With additional code, you can update the underlying recordset but that is beyond the scope of this particular article.
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbhowto KB254117 |
---|
|