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

Sorting Proprogrammatically Two Columns

Thread ID:





142784 Feb 19,2019 07:41 PM UTC Feb 20,2019 09:23 AM UTC WinForms 3
Tags: SfDataGrid
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. 


Replied On February 20, 2019 08:07 AM UTC


Thank you very much Jagadeesan  for you support.


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. 



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

Live Chat Icon For mobile
Live Chat Icon