I was wondering if this is known behavior or if I am implementing something incorrectly. When I converted a databound grid to use the virtual events to populate it, the sorting and filterbar functionality stopped working.
I am assuming because the event GridQueryCellInfo doesnt take into account the filterbar and/or sorting.
Also, when changing the datasources DefaultView.Sort property has no affect on the data.
ADAdministrator Syncfusion Team November 17, 2003 04:10 AM
In a virtual grid, you are responsible for prividing the data you want to see at e.RowIndex and e.ColIndex in QueryCellInfo. In a virtual grid, the grid knows nothing about what is sorted, what is filtered, whats been moved, whats been deleted, etc. All it knows is that when it get ready to use a value at some row and col, it fires QueryCellInfo with e.RowIndex and e.ColIndex set, and simply uses what is returned in e.Style.
So, in a virtual grid, if you want sorting or filtering or ???, then your external datasource must handle it. If your external datasource is a datatable, then in QueryCellInfo, you might consider providing the values from the datatable.DefaultView instead of directly from the datatable. Then if you sort things by setting datatable.DefaultView.Sort, or filter things by setting datatable.DefaultView.RowFilter, then your QueryCellInfo (& QueryRowCount) would provide the view information which should respond to these property settings.
JFJim FrapperNovember 17, 2003 03:44 PM
It turns out that once you drive the GridQueryCellInfo off of the default view, the column sorting and FilterBar work fine.