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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Persisting the sort order of the grid

Thread ID:

Created:

Updated:

Platform:

Replies:

27154 Apr 6,2005 09:57 PM UTC Apr 6,2005 10:02 PM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 6, 2005 09:57 PM UTC

Hi Clay, I''m looking for a way to persist the sort order of a GDBG. What kind of information do I have to persist/restore to get the last sort order of a grid? Regards, Thomas

Administrator [Syncfusion]
Replied On April 6, 2005 10:01 PM UTC

I forgot something: I''ll get the same view for the user( sort direction in the header row ). Regards, Thomas

Administrator [Syncfusion]
Replied On April 6, 2005 10:02 PM UTC

Assuming you are using a DataTable as the DataSource, the simplest way is to get this information is through the DataView associated with the CurrencyManager. CurrencyManager cm = (CurrencyManager)grid.BindingContext[grid.DataSource, grid.DataMember]; DataView dv = (DataView) cm.List; //to persist the sort, save dv.Sort string persistedValue = dv.List; //to set the sort dv.Sort = persistedValue;

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;