ComponentOne VSFlexGrid 8.0
VirtualData Property

Returns or sets whether all data is fetched from the data source at once or as needed.

Syntax

[form!]VSFlexGrid.VirtualData[ = {True | False} ]

Remarks

The 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 Sub

If 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 Type

Boolean

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback