aspnet-devexpress-dot-web-dot-aspxgridbase-f1b68e8a.md
Clears the sorting applied to the grid control.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public void ClearSort()
Public Sub ClearSort
When you call the ClearSort method, the control clears the sorting and grouping applied to its data.
For more information on sorting in a particular control, refer to the following topics:
<dx:ASPxGridView ID="ASPxGridView1" runat="server" onCustomCallback="ASPxGridView1_CustomCallback" >
<$--...--$>
</dx:ASPxGridView>
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e) {
ASPxGridView1.ClearSort();
}
Protected Sub ASPxGridView1_CustomCallback(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridViewCustomCallbackEventArgs)
ASPxGridView1.ClearSort()
End Sub
@Html.DevExpress().GridView(settings => {
settings.BeforeGetCallbackResult = (sender, e) => {
MVCxGridView grid = (MVCxGridView)sender;
grid.ClearSort();
//...
};
}).Bind(Model).GetHtml()
See Also