ASPxGridView.GetSortedColumns() Method
Returns a collection of columns involved in sorting.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v20.2.dll
NuGet Package: DevExpress.Web
Declaration
Returns
Type | Description |
---|---|
ReadOnlyCollection<GridViewDataColumn> | The collection of columns involved in sorting. |
Remarks
The ASPxGridView allows data sorting by multiple columns. The GetSortedColumns method provides access to the columns involved in sorting. This method can be used if you need to traverse through the sorted columns to perform operations on them. For example, you may want to change the sort order. Note that this collection is read only; it doesn’t allow columns to be added or removed. To apply or cancel sorting by column values, use the column’s GridViewDataColumn.SortOrder property.
Sorting is allowed if the ASPxGridBehaviorSettings.AllowSort property is set to true.
To learn more, see Sorting.