A newer version of this page is available. Switch to the current version.

GridViewColumnState.SortIndex Property

Gets or sets the column's position among sorted columns.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v18.2.dll


public int SortIndex { get; set; }
Public Property SortIndex As Integer

Property Value

Type Description

An integer value that specifies the zero-based column's index among sorted columns. -1 if data is not sorted by this column.


The GridView 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 more than one column, the newly sorted column is appended to the collection and gets an index of 1, etc.

See Also