PivotGridControl.FieldAreaChanging Event
Enables you to control whether the dragged field header can be dropped at the area it’s currently located over.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v18.1.dll
Declaration
Event Data
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. |
Remarks
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:
- the area the dragged field header is currently located over is changed;
- the field header’s position among the other headers within the same area is changed.
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.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FieldAreaChanging event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.