.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

IModelColumn.SortIndex Property

Specifies the sequence of column sorting.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v21.2.dll


int SortIndex { get; set; }

Property Value

Type Default Description


An integer value specifying the sequence of column sorting.


List View records can be sorted by multiple columns. The SortIndex value is zero-based. It means that initially, List View records are sorted by the column with the zero SortIndex value, second - by the column with SortIndex set to 1, etc. The -1 value cancels data sorting by this column. When it is required to sort a List View by the single column, this column’s SortIndex should be zero. Note that by default, if the SortIndex property value does not equal -1, the Ascending sorting is applied (IModelColumn.SortOrder is set to ColumnSortOrder.Ascending). So, to disable sorting, you must set SortIndex to -1 and SortOrder to None.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SortIndex property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also