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

    Specifies the template for the drag hint.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [Parameter]
    public RenderFragment<TreeListDragHintTextTemplateContext> DragHintTextTemplate { get; set; }

    Property Value

    Type Description
    RenderFragment<TreeListDragHintTextTemplateContext>

    The template content.

    Remarks

    The drag hint displays the row preview if a user drags one row. If a user drags multiple rows, the hint displays the number of currently dragged rows.

    Default drag hint content

    Use the DragHintTextTemplate to define a custom message template for the drag hint. The custom template keeps predefined paddings and the drag handle icon.

    Example

    The following example replaces the default text message:

    <DxTreeList @ref="TreeList"
                Data="DataSource"
                KeyFieldName="Id"
                ParentKeyFieldName="ParentId"
                ItemsDropped="TreeList_ItemsDropped"
                SelectionMode="TreeListSelectionMode.Multiple"
                AllowSelectRowByClick="true"
                AllowDragRows="true">
        <Columns>
            <DxTreeListDataColumn FieldName="Name" Caption="Task" SortOrder="TreeListColumnSortOrder.Ascending" />
            <DxTreeListDataColumn FieldName="EmployeeName" Caption="Assigned To" TextAlignment="TreeListTextAlignment.Left" Width="200px" />
            <DxTreeListDataColumn FieldName="StartDate" Width="100px" />
            <DxTreeListDataColumn FieldName="DueDate" Width="100px" />
        </Columns>
        <DragHintTextTemplate>
            @{
                var taskCount = context.DataItems.Count();
            }
            <i>Selected tasks: @taskCount</i>
          </DragHintTextTemplate>
    </DxTreeList>
    

    Drag hint template

    See Also