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

Sorting Proprogrammatically Two Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

142784 Feb 19,2019 07:41 PM UTC Feb 20,2019 09:23 AM UTC WinForms 3
loading
Tags: SfDataGrid
Antonio
Asked On February 19, 2019 07:41 PM UTC


Good afternoon. Is it possible to order a sfdatagrid programmatically with two columns? Thanks for the help.

Jagadeesan Pichaimuthu [Syncfusion]
Replied On February 20, 2019 06:58 AM UTC

Hi Antonio, 

Thanks for using Syncfusion product. 

You can able to programmatically sort the multiple columns by using the SortColumnDescriptions property in SfDataGrid. Please find the code snippet below to sort the two columns programmatically, 

this.sfDataGrid.SortColumnDescriptions.Add(new SortColumnDescription(){ ColumnName = "OrderID" }); 
this.sfDataGrid.SortColumnDescriptions.Add(new SortColumnDescription() { ColumnName = "CustomerID" }); 



Let us know whether this helps also if you need any further assistance on this. 

Regards, 
Jagadeesan 


Antonio
Replied On February 20, 2019 08:07 AM UTC

Perfect!

Thank you very much Jagadeesan  for you support.

Greetings.

Jagadeesan Pichaimuthu [Syncfusion]
Replied On February 20, 2019 09:23 AM UTC

Hi Antonio, 

Thanks for your update. 

We are glad to know that the provided solution worked at your end. Please let us know if you have any further queries on this. We are happy to help you. 

Regards, 
Jagadeesan 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

;