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

Grid control sorting

Hi, everyone

I'd like to know if I can sort columns in Syncfusion's Grid control in the same way I can do it with Microsoft's datagridview: grd.Sort(clm, ComponentModel.ListSortDirection.Ascending)

Thanks in advance and have a good day :)
Allon

3 Replies

LS Lingaraj S Syncfusion Team October 19, 2009 12:51 PM UTC

Hi Allon,

Thank you for your interest in Syncfusion products.

The GridControl does not have default property to sort the columns with column header and by methods. 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. I have attached a sample that illustrates this better.

Refer the sample in below link, it demonstrate the Sorting in GridControl.
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/Forums/GridSort.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.


AL Allon October 20, 2009 07:08 AM UTC

Lingaraj S., thanks a lot.

That was really helpful.

Regards,
Allon


LS Lingaraj S Syncfusion Team October 20, 2009 10:09 AM UTC

Hi Allon,

Thanks for the update.

Please let me know if it helps.

Regards,
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon