Skip to main content
All docs
V25.1
  • DxTreeList.SearchBoxNullText Property

    Specifies the prompt text displayed in the search box when it is empty.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(null)]
    [Parameter]
    public string SearchBoxNullText { get; set; }

    Property Value

    Type Default Description
    String null

    A prompt text.

    Remarks

    Set the ShowSearchBox property to true to display a search box in the TreeList component. When users type in the search box, the TreeList filters data rows, displays those that match the search string, and highlights search results.

    Use the SearchBoxNullText property to specify the prompt text displayed in the search box when it is empty:

    @inject EmployeeTaskService EmployeeTaskService
    
    <DxTreeList Data="TreeListData"
                KeyFieldName="Id"
                ParentKeyFieldName="ParentId"
                ShowSearchBox="true"
                SearchBoxNullText="Search for a task...">
        <Columns>
            <DxTreeListDataColumn FieldName="Name" Caption="Task" />
            <DxTreeListDataColumn FieldName="EmployeeName" SearchEnabled="false" />
            <DxTreeListDataColumn FieldName="StartDate" SearchEnabled="false" />
            <DxTreeListDataColumn FieldName="DueDate" SearchEnabled="false" />
        </Columns>
    </DxTreeList>
    
    @code {
        List<EmployeeTask> TreeListData { get; set; }
    
        protected override void OnInitialized() {
            TreeListData = EmployeeTaskService.GenerateData();
        }
    }
    

    Search Box Overview

    Refer to the following topic for additional information: Search Box in Blazor TreeList.

    See Also