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

GridControl Sorting

Thread ID:





90282 Sep 24,2009 08:08 AM UTC Sep 24,2009 11:05 AM UTC WinForms 1
Tags: GridControl
Asked On September 24, 2009 08:08 AM UTC

Hi, everyone

I'd like to know, if there any way to sort rows in GridControl.

My question is if there is a way to sort GridControl based on values of specific column.

If there is no way how can I sort GridControl based on values of specific column using CellClick efficiently?

Something which will be similiar to:

Private Sub grdNew_CellClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs) Handles grdNew.CellClick
Select Case e.ColIndex
Case 1

Case 2

End Select
End Sub

Regards, and have a nice day :)


I don't use data binding. I add rows programmatically.

Lingaraj S [Syncfusion]
Replied On September 24, 2009 11:05 AM UTC

Hi Allon,

Thank you for your interest in Syncfusion products.

There is no built-in support for sorting rows. But it can be achieved by Custom IComparer's.

Refer the sample from below link to sort a rows:

Also the GridControl does not have default property to sort the columns with column header. However It can be achieved with Data.SortByColumn method in GridControl. In that method the IComparer object is used to sort the data's in GridControl.

Refer the sample in below link, it demonstrate the Sorting in GridControl.

Refer a another sample in below link, it demonstrate the MutipleColumnSorting in GridControl.

Please let me know if you have any queries.

Lingaraj S.


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