TreeListColumn.SortIndex Property
Gets the index of the column in the sorting columns list.
Namespace: DevExpress.XtraTreeList.Columns
Assembly: DevExpress.XtraTreeList.v18.2.dll
Declaration
[Browsable(false)]
[DefaultValue(-1)]
[XtraSerializableProperty]
public int SortIndex { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Int32 | -1 | An integer value representing the zero-based index of the column within the sorting columns list. |
Remarks
The Tree List control enables you to sort data by values. This can be done by setting the TreeListColumn.SortOrder property of columns to an appropriate enumeration value. End-users can do the same by clicking the desired column headers while holding the SHIFT key down.
The order of applying sorting to columns is significant. When applying sorting by a single column, each group of nodes that have the same parent is sorted. The column is added into the internal sorting columns list at the zero position. When sorting an additional column, only nodes that have the same value in the first column are rearranged, etc. Further columns are also added to the sorting columns list at appropriate positions. You can refer to the Sorting topic for details on the sorting algorithm implemented in the XtraTreeList.
The SortIndex property enables you to determine the position of the column in the sorting columns list. You can get the total number of columns involved in sorting using the TreeList.SortedColumnCount property.