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

GridViewCommandColumn.ShowClearFilterButton Property

Specifies whether the Clear command button is displayed in the command column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(false)]
public bool ShowClearFilterButton { get; set; }

Property Value

Type Default Description
Boolean **false**

true, if the button is visible; otherwise, false.

Remarks

Use the ShowClearFilterButton property to specify whether the Clear button is visible in the command column. The button settings can be customized using the ASPxGridViewCommandButtonSettings.ClearFilterButton property.

The Clear button can be displayed if the filter row is visible and a filter expression is applied to the grid.

Declaratively:

<dx:ASPxGridView ID="ASPxGridView1" runat="server" >
    <Columns>  
        <dx:GridViewCommandColumn ShowClearFilterButton="True" />  
        ...
    </Columns>  
</dx:ASPxGridView>

In code:

using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)  {
    ASPxGridView grid1 = new ASPxGridView();
    grid1.ID = "grid1";
    Page.Form.Controls.Add(grid1);
    ...
    GridViewCommandColumn commandColumn = new GridViewCommandColumn();
    commandColumn.ShowClearFilterButton = true;
    grid1.Columns.Add(commandColumn);
    ...
}
See Also