Skip to main content

PivotGridControl.FieldAreaChanging Event

Occurs before a field's position is changed, allowing cancellation of this action.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

#Declaration

public event PivotFieldAreaChangingEventHandler FieldAreaChanging

#Event Data

The FieldAreaChanging event's handler receives an argument of the PivotFieldAreaChangingEventArgs type. 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 PivotFieldEventArgs.
Handled Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
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.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

#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 a field's location is changed, allowing you to control whether the dragged field header can be dropped at the area it is currently located over. To prevent the field from being dropped at the position it's currently located over, set the event parameter's PivotFieldAreaChangingEventArgs.Allow property to false.

The field and its current position are identified by the PivotFieldEventArgs.Field, PivotFieldAreaChangingEventArgs.NewArea and PivotFieldAreaChangingEventArgs.NewAreaIndex properties, respectively.

See Also