TreeListImageColumn.SortIndex Property
Gets or sets the column’s position among sorted columns.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Int32 | -1 | An integer value that specifies the zero-based column’s index among sorted columns. -1 if data is not sorted by this column. |
Remarks
The ASPxTreeList allows data sorting by multiple columns. Once a column is sorted, it is automatically added to the collection of sorted columns. If no columns were previously sorted, the column becomes the only element in the collection and gets the 0 sort index. If sorting by additional columns, the newly sorted column is appended to the collection and gets the 1 index, etc.
When data is sorted by multiple columns, you can change the position (order) of sorted columns using the SortIndex property.
Set the SortIndex property to a non-negative integer to add the column to the sorted columns list. The column’s TreeListImageColumn.SortOrder property is automatically set to ColumnSortOrder.Ascending. Setting a column’s SortIndex property value to -1 cancels data sorting by this column.
Note
Automatic sorting is not available for columns of the TreeListImageColumn type. If you need to have a sortable binary image column, you should implement your custom sorting logic by handling the ASPxTreeList.CustomNodeSort event.
To learn more, see Sorting.