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

DxGrid.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<GridDragHintTextTemplateContext>

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 displays the total price for the dragged products:

Razor
<DxGrid @ref="@InStockGrid"
        Data="InStockProducts"
        AllowSelectRowByClick="true"
        SelectionMode="GridSelectionMode.Multiple"
        AllowDragRows="true"
        ItemsDropped="Grid_ItemsDropped">
    <Columns>
        <DxGridDataColumn FieldName="ProductName" MinWidth="50" />
        <DxGridDataColumn FieldName="UnitPrice" DisplayFormat="c2" />
    </Columns>
    <DragHintTextTemplate>
        @{
            decimal? totalPrice = context.DataItems.Cast<Product>().Sum(x => x.UnitPrice);
        }
        <i>Total price: $@totalPrice</i>
    </DragHintTextTemplate>
</DxGrid>

Drag hint template

See Also