Sort Data in Vertical Grid
ASPxVerticalGrid allows its data to be sorted by an unlimited number of rows.
To enable the sorting feature, set the row’s GridDataColumnSettings.AllowSort property to true
. If this property is set to Default, the row’s behavior is controlled by ASPxVerticalGrid’s ASPxGridBehaviorSettings.AllowSort option.
Note
By default, ASPxVerticalGrid does not sort a row if its data items do not implement the IComparable interface. To sort such rows, you can do one of the following.
- Manually implement the IComparable interface for row data items.
- Implement custom row sorting. For this purpose, set the row’s GridDataColumnSettings.AllowSort property to
true
, set the GridDataColumnSettings.SortMode property to Custom, and implement a custom sorting algorithm within the ASPxVerticalGrid.CustomRowSort event handler.