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 mode Grid Control - Sorting and Column Drag drop

Hi,

I am using a Grid Control in virtual mode. Does it support sorting and Column reorder via drag and drop in Virtual mode.

Pats


3 Replies

RC Rajadurai C Syncfusion Team January 12, 2009 05:52 AM UTC

Hi Pats,

Thanks for your interest in Syncfusion products.

Virtualgrid Sorting:
*******************

In a virtual grid, there is no built-in support for sorting. The reason for this is in a virtual Grid, the data is maintained seperately and is provided on demand to the grid using the QueryCellInfo event handler. So whatever the data comes in through this event handler, the grid just displays it. It has no control over the external datasource.
One way to achieve sorting is, create some sort of index array during your sort where the array tracks in some manner the relationship between the unsorted data and the sorted data. Then in your QueryCellInfo handler, you would use this array to get the proper reference for the requested row.

Please refer to the following sample that shows this.
http://websamples.syncfusion.com//samples/Grid.Windows/F78913b.zip

Column Reordering through Drag drop:
***********************************

Column reordering is not directly supported in the virtual grid.

To manage this, you need to maintain a correspondence between the initial col positions and any moved col positions.

Please refer to the following sample that shows column reordering by maintaining col positions through an array which is supplied as colindex while moving.
http://websamples.syncfusion.com//samples/Grid.Windows/F78913a.zip

Regards,
Rajadurai



DE Derek Edwards June 16, 2010 08:59 PM UTC

Is it possible to update the link to this sample? I am interested in the solution to this issue


RC Rajadurai C Syncfusion Team June 18, 2010 02:39 PM UTC

Hi Derek,

Thanks for your update.

We regret for the inconvenience caused with the broken sample links.

Here are the modified links for your reference.
1) Virtual Grid Sorting.
http://help.syncfusion.com//samples/Grid.Windows/F78913b.zip

2) Column reordering through drag'n'drop
http://help.syncfusion.com//samples/Grid.Windows/F78913a.zip

Regards,
Rajadurai

Loader.
Live Chat Icon For mobile
Up arrow icon