AD
Administrator
Syncfusion Team
November 19, 2003 12:22 PM UTC
In a virtual grid, the grid does not allocate any storage for row and column objects. In order to get the grid to allocate storage for these column styles, you would have to explicitly set either grid.ColCount or gridModel.Data.ColCount to reflect the values you need to have. You cannot just provide the value in QueryColCount as this does not allocate storage.
The difference between using grid.ColCount and grid.Model.Data.ColCount is that the latter avoids the event handling (like QueryColCount). So, if you set the colcount on the data object, I think you could still effectively use QueryColCount if you need that flexibility. Other wise, you could try removing QueryColCount and just set grid.ColCount whenever the number of your columns change.