Back to Devexpress

DxGridDataColumn.FilterMenuButtonDisplayMode Property

blazor-devexpress-dot-blazor-dot-dxgriddatacolumn-ef3efe04.md

latest3.6 KB
Original Source

DxGridDataColumn.FilterMenuButtonDisplayMode Property

Specifies when the column displays the filter menu button.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(GridFilterMenuButtonDisplayMode.Default)]
[Parameter]
public GridFilterMenuButtonDisplayMode FilterMenuButtonDisplayMode { get; set; }

Property Value

TypeDefaultDescription
GridFilterMenuButtonDisplayModeDefault

An enumeration value.

|

Available values:

NameDescription
Default

For the DxGrid.FilterMenuButtonDisplayMode property, the buttons are always hidden.
For the DxGridDataColumn.FilterMenuButtonDisplayMode property, to inherit the value from the DxGrid.FilterMenuButtonDisplayMode property

| | Never |

The buttons are always hidden.

| | Always |

The buttons are always visible.

|

Remarks

Set the FilterMenuButtonDisplayMode property to Always to display filter menu button in the column header. When a user clicks the button, the Grid displays a dropdown with all unique column values. Users can select and deselect these values to filter Grid data.

To specify the button visibility for all data columns, use the FilterMenuButtonDisplayMode property. Note that the value specified at the column level overrides that of the component level.

Run Demo: Column Filter Menu

Note

The Grid cannot create filter item lists for columns associated with certain data types (for instance, arrays and images). If you do not implement a filter menu template for such a column, the column filter menu displays the following text instead of filter items: “No filters are available for this column”.

For additional information about column filter menus, refer to the following help topic: Column Filter Menu in Blazor Grid.

razor
@inject CustomerService CustomerData

<DxGrid Data="@customers" 
        FilterMenuButtonDisplayMode="GridFilterMenuButtonDisplayMode.Always">
    <Columns>
        <DxGridDataColumn FieldName="ContactName" />
        <DxGridDataColumn FieldName="Company" />
        <DxGridDataColumn FieldName="Country" 
                          FilterMenuButtonDisplayMode="GridFilterMenuButtonDisplayMode.Never" />
    </Columns>
</DxGrid>

@code {
    IGrid grid { get; set; }
    DateTime data { get; set; }
    private Customer[]? customers;
    protected override async Task OnInitializedAsync() {
        customers = await CustomerData.GetData();
    }
}

Implements

FilterMenuButtonDisplayMode

See Also

DxGridDataColumn Class

DxGridDataColumn Members

DevExpress.Blazor Namespace