Skip to main content
All docs
V25.1
  • DxPivotTableField.AllowDrag Property

    Specifies whether users can drag the field header and drop it onto another area.

    Namespace: DevExpress.Blazor.PivotTable

    Assembly: DevExpress.Blazor.PivotTable.v25.1.dll

    NuGet Package: DevExpress.Blazor.PivotTable

    Declaration

    [DefaultValue(null)]
    [Parameter]
    public bool? AllowDrag { get; set; }

    Property Value

    Type Default Description
    Nullable<Boolean> null

    true to enable field dragging; otherwise, false.

    Remarks

    The Blazor Pivot Table allows users to customize data layout by dragging field headers between areas: Rows, Columns, Data, Filter. This capability helps users view data from different perspectives without the need for code modifications.

    Pivot Table - Drag Fields

    Use the AllowDrag property to specify whether users can drag the field. This property has priority over the DxPivotTable.AllowDragFields property.

    The following code disables dragging for the Region row field:

    <DxPivotTable Data="SalesData">
        <Fields>
            <DxPivotTableField Field="@nameof(Sales.SaleInfo.Region)"
                               Area="@PivotTableArea.Row"
                               AreaIndex="0" 
                               AllowDrag= "false"/>
            @*...*@
        </Fields>
    </DxPivotTable>
    

    Implements

    See Also