Back to Devexpress

DxTreeList.DataColumnFilterMenuTemplate Property

blazor-devexpress-dot-blazor-dot-dxtreelist-572d5afd.md

latest3.6 KB
Original Source

DxTreeList.DataColumnFilterMenuTemplate Property

Specifies a common template used to display all column filter menus.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public RenderFragment<TreeListDataColumnFilterMenuTemplateContext> DataColumnFilterMenuTemplate { get; set; }

Property Value

TypeDescription
RenderFragment<TreeListDataColumnFilterMenuTemplateContext>

The template content.

|

Remarks

Specify the DataColumnFilterMenuTemplate to define a common template for all drop-down filter menus in TreeList column headers.

The template accepts a TreeListDataColumnFilterMenuTemplateContext object as the context parameter. This parameter allows you to do the following:

Note

The GetDataItemsAsync() method cannot obtain unique values from a column whose data items do not implement IComparable type. If you call the method for such a column, an error may occur.

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

To define a template for an individual data column, use the column’s DxTreeListDataColumn.FilterMenuTemplate property. For additional information about templates in the TreeList component, refer to the following topic: Templates in Blazor TreeList.

Implements

DataColumnFilterMenuTemplate

See Also

DxTreeList Class

DxTreeList Members

DevExpress.Blazor Namespace