Sorting
ASPxGridView data can be sorted by an unlimited number of data columns.
To enable this sorting feature, set the column’s GridDataColumnSettings.AllowSort property to True. If this property is set to Default, the column’s behavior is controlled by ASPxGridView’s ASPxGridBehaviorSettings.AllowSort option.
Note
By default, ASPxGridView does not sort a column if its data items do not implement the IComparable interface. To sort such columns, do one of the following.
- Manually implement the IComparable interface for column data items.
- Implement custom column sorting. To do so, set the column’s GridDataColumnSettings.AllowSort property to true, set the GridDataColumnSettings.SortMode property to Custom, and implement a custom sorting algorithm within the ASPxGridView.CustomColumnSort event handler.