blazor-devexpress-dot-blazor-dot-dxtreelist-57404bd7.md
Specifies the template for the drag hint.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public RenderFragment<TreeListDragHintTextTemplateContext> DragHintTextTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<TreeListDragHintTextTemplateContext> |
The template content.
|
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.
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>
See Also