ASPxClientGridView.ColumnSorting Event

Enables you to prevent columns from being sorted.


ColumnSorting: ASPxClientEvent<ASPxClientGridViewColumnCancelEventHandler<ASPxClientGridView>>

Event Data

The ColumnSorting event handler receives an argument of the ASPxClientGridViewColumnCancelEventArgs type. The following properties provide information specific to this event.

Property Description
cancel Gets or sets a value indicating whether the action which raised the event should be canceled.
(Inherited from ASPxClientCancelEventArgs)
column Gets the processed client column.


The ASPxGridView supports sorting data by an unlimited number of data columns. The ColumnSorting event is raised before the ASPxGridView's data is sorted and allows you to prevent data from being sorted by the values of particular columns. The processed client column is identified by the event parameter's column property. To cancel sorting, set the cancel property to true.

function OnColumnSorting(s, e) {
    if (e.column.fieldName == "Description")  
        e.cancel = true;  

<dx:ASPxGridView ID="grid" runat="server" ClientInstanceName="grid" ...>
    <ClientSideEvents ColumnSorting="OnColumnSorting" />
See Also