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.
Unfortunately, activation email could not send to your email. Please try again.

Get Sorted Column

Thread ID:

Created:

Updated:

Platform:

Replies:

12193 Mar 23,2004 12:17 PM Mar 24,2004 04:43 AM Windows Forms 3
loading
Tags: GridControl
Jose Luis Melo
Asked On March 23, 2004 12:17 PM

Hi, I want to update a databoundgrid datasource, but keep the sorted column sorted. How can I get the sorted column, and its sorting method, and insert it again when datasource is updated ? Thanks, Luis Melo

Administrator [Syncfusion]
Replied On March 23, 2004 12:40 PM

If your datasource is a DataTable, then you can try saving the dataTable1.DefaultView.Sort property. Then after the update, you can reset it. string save = this.dataTable1.DefaultView.Sort; //update things... this.dataTable1.DefaultView.Sort = save;

Jose Luis Melo
Replied On March 24, 2004 03:33 AM

Sorry, I think I forgot to tell you that the Sort I wanted to save was the one I selected in the FilterBar''s grid. If I click on the 3rd column and make the column sorted by that column, then when I update the datasource''s grid, I would like to replace the sort I selected before. Thanks again, Luis Melo

Administrator [Syncfusion]
Replied On March 24, 2004 04:43 AM

Do you mean the filter instead of the sort? If so, you would save and restore the RowFilter property instead of the Sort property. string save = this.dataTable1.DefaultView.RowFilter; //update things... this.dataTable1.DefaultView.RowFilter = save;

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.

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.

;