Back to Devexpress

DxTreeList.FilterMenuButtonDisplayMode Property

blazor-devexpress-dot-blazor-dot-dxtreelist-d3410097.md

latest3.7 KB
Original Source

DxTreeList.FilterMenuButtonDisplayMode Property

Specifies when the TreeList displays filter menu buttons in column headers.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDefaultDescription
TreeListFilterMenuButtonDisplayModeDefault

An enumeration value.

|

Available values:

NameDescription
Default

For the DxTreeList.FilterMenuButtonDisplayMode property, the buttons are always hidden.
For the DxTreeListDataColumn.FilterMenuButtonDisplayMode property, to inherit the value from the DxTreeList.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 buttons in column headers. When a user clicks a filter menu button, the TreeList displays a dropdown with all unique column values. Users can select and deselect these values to filter TreeList data.

To specify button visibility for a particular data column, use the DxTreeListDataColumn.FilterMenuButtonDisplayMode property.

Run Demo: Column Filter Menu

Note

The TreeList 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 TreeList.

The following example adds a filter menu button to all columns, except Task :

razor
<DxTreeList Data="Data"
            KeyFieldName="Id"
            ParentKeyFieldName="ParentId"
            FilterMenuButtonDisplayMode="TreeListFilterMenuButtonDisplayMode.Always"
            CssClass="max-h-480">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" 
                              Caption="Task" 
                              FilterMenuButtonDisplayMode="TreeListFilterMenuButtonDisplayMode.Never" />
        <DxTreeListDataColumn FieldName="EmployeeName" Caption="Assigned To" TextAlignment="TreeListTextAlignment.Left" />
        <DxTreeListDataColumn FieldName="StartDate" Width="150px" />
        <DxTreeListDataColumn FieldName="DueDate" Width="150px" />
    </Columns>
</DxTreeList>

Implements

FilterMenuButtonDisplayMode

See Also

DxTreeList Class

DxTreeList Members

DevExpress.Blazor Namespace