aspnet-devexpress-dot-web-dot-aspxpivotgrid-dot-aspxpivotgrid-ec6cd0f9.md
Enables you to control whether the dragged field header can be dropped at the area it’s currently located over.
Namespace : DevExpress.Web.ASPxPivotGrid
Assembly : DevExpress.Web.ASPxPivotGrid.v25.2.dll
NuGet Package : DevExpress.Web
public event PivotAreaChangingEventHandler FieldAreaChanging
Public Event FieldAreaChanging As PivotAreaChangingEventHandler
The FieldAreaChanging event's data class is PivotAreaChangingEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Allow | Gets or sets whether the dragged field header can be dropped on the area it’s currently located over. |
| Field | Gets the field being processed. Inherited from PivotFieldEventArgsBase<T>. |
| NewArea | Gets the current position of the field being dragged. |
| NewAreaIndex | Gets the index of the field which is being dragged for the area it’s currently located over among the other fields displayed within the area. |
End users can move fields from one area to another or reorder the fields within the same area by dragging their headers. The FieldAreaChanging event is raised before:
Dragging the field to the customization form hides this field. In this case, field’s PivotGridFieldBase.Visible property becomes false , but the PivotGridFieldBase.Area property remains unchanged. For example, you hide a field from the Data Area. The field’s PivotGridFieldBase.Area property value is still DataArea , but its PivotGridFieldBase.Visible property is changed to false.
This event lets you prevent the field from being dropped at the current location. To prevent dropping, set the PivotAreaChangingEventArgs.Allow parameter to false. This changes the mouse cursor to which indicates that the field cannot be dropped at the area it’s currently located over.
The field whose position is being changed and its current position are identified by the PivotFieldEventArgsBase<T>.Field, PivotAreaChangingEventArgs.NewArea and PivotAreaChangingEventArgs.NewAreaIndex properties, respectively.
See Also