Back to Devexpress

DxTreeList.DragHintTextTemplate Property

blazor-devexpress-dot-blazor-dot-dxtreelist-57404bd7.md

latest2.5 KB
Original Source

DxTreeList.DragHintTextTemplate Property

Specifies the template for the drag hint.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDescription
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.

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>

Implements

DragHintTextTemplate

See Also

DxTreeList Class

DxTreeList Members

DevExpress.Blazor Namespace