Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxTreeList.DragHintTextTemplate Property

Specifies the template for the drag hint.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

#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:

Razor
<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