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.

How to sort a column with numeric data in GridDataBoundGrid?

To sort the column with numeric data, it can be handled by customizing the sorting with IComparer. In this sample, sorting comparison can be done by IntComparer which is derived from IComparer.

Sorting behavior might be single click, double click or none can be handled by SortBehaviour. Here, a helper class `CustomSortHelper` is used set the custom comparer for the columns.

 

 

`IntComparer` derived from the IComparer which can be used for compare the x and y indices.

 

 

Sample

C#: Sort a column

VB: Sort a column

Article ID: Published Date: Last Revised Date: Platform: Control:
6745 04/28/2016 04/28/2016 Windows Forms GridDataBoundGrid(Classic)
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.