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

Sort by Column Question

I am using a virtual gridcontrol and I need to sort by column. I catch the double click event on the header and I call SortByColumn(). It works, but the problem is as that as soon as it sorts, the data is overriden on the refresh by QueryCellInfo(). Is there a way to trigger a save on all the data cells in a grid? If I call OnSaveCellInfo() for each cell in a loop after calling SortByColumn(), then the data stays because it was saved to my data object, but I'm guessing that there must be a function on the grid I can call to make it save all cells at once. Any ideas?

Kyle

3 Replies

AD Administrator Syncfusion Team March 7, 2007 04:03 PM UTC

Hi Kyle,

Here is a forum thread that discuss with the sorting in a virtual grid. Please refer this thread and let me know if this helps.
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=39137

Best Regards,
Haneef


KD Kyle DeVoe March 7, 2007 04:37 PM UTC

Haneef,

Thanks for the link, I have read over it. I think the best thing to do is sort the data object, but I am building a grid base class that other developers will be using and they do not want to sort the data in the data object, they want the grid to do it. Like I said, it is working, except for the fact that I have to go through and save each cell by hand. I would think there would be a call I could make to force the grid to save it's contents. If there is not, then I will just continue what I am doing. I will look again at the grid sorting tutorial.


AD Administrator Syncfusion Team March 7, 2007 07:04 PM UTC

Hi Kyle,

There is no single method to call SaveCellInfo event for all cells in a grid. If you want to call the SaveCellInfo for all cells then call OnSaveCellInfo method for every cells in a grid.

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon