AD
Administrator
Syncfusion Team
February 26, 2004 10:19 PM UTC
If it is a virtual grid, then the values for the grid should be coming from some outside dtatsource. So, in QueryCellInfo, why can you not retrieve the needed value directly from the outside datasource instead of trying to retrieve it by indexing the grid.
Normally, you can avoid recursion in QueryCellInfo in the following manner. Suppose you need to know the value for grid[2,4] in QueryCellInfo. In this case, you can check for e.ColIndex == 4 and e.RowIndex ==2. If this is true, then the value you want (grid[2,4] is just e.Style.CellValue. If it is not true, then you can access grid[2,4] without triggering recursion.
But this is only needed when the grid stores the data in its data object. When the data is from some external data source, you should try getting it directly from the data source, and not through the the grid with an indexer.