Skip to main content
A newer version of this page is available. .
Tab

ASPxGridBase.ClearSort() Method

Clears sorting applied to the grid control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public void ClearSort()

Remarks

ASPxGridView-Specific Information

If grouping is applied, the ClearSort method ungroups the ASPxGridView and removes all the sorting applied to any column.

Web Forms:

<dx:ASPxGridView ID="ASPxGridView1" runat="server" onCustomCallback="ASPxGridView1_CustomCallback" >
    //...
</dx:ASPxGridView>
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e)
{
    ASPxGridView1.ClearSort();
    //...
}

MVC:

@Html.DevExpress().GridView(settings => {
    settings.BeforeGetCallbackResult = (sender, e) => {
        MVCxGridView grid = (MVCxGridView)sender;
        grid.ClearSort();
        //...
    };
}).Bind(Model).GetHtml()
See Also