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

Persisting the sort order of the grid

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

2 Replies

AD Administrator Syncfusion Team April 6, 2005 05:01 PM

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


AD Administrator Syncfusion Team April 6, 2005 05:02 PM

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;

Loader.
Live Chat Icon For mobile
Up arrow icon