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