We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Virtual grid + sorting + filterbar

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. Cheers, JF

2 Replies

AD Administrator Syncfusion Team November 17, 2003 09:10 AM UTC

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.


JF Jim Frapper November 17, 2003 08:44 PM UTC

It turns out that once you drive the GridQueryCellInfo off of the default view, the column sorting and FilterBar work fine. Cheers, JF

Loader.
Live Chat Icon For mobile
Up arrow icon