ASPxGridView.SortBy(GridViewColumn, Int32) Method
Sorts data in ascending order by the values of the specified data column, and places the column to the specified position among the sorted columns.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.1.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
column | GridViewColumn | A GridViewColumn object that represents the column within the ASPxGridView. |
value | Int32 | An integer value that specifies the zero-based column’s index among the sorted columns. -1 if data is not sorted by this column. |
Returns
Type | Description |
---|---|
Int32 | An integer value that specifies the zero-based column’s index among the sorted columns. |
Remarks
The ASPxGridView allows data sorting by multiple columns. Any previous sorting is not cleared when calling the SortBy method. The newly sorted column is inserted at the specified position within the collection of sorted columns. Its position within the collection can then be changed using the GridViewDataColumn.SortIndex property.
Sorting is allowed if the ASPxGridBehaviorSettings.AllowSort property is set to true.