PivotGridControl.FieldAreaChanged Event
Occurs after a field location or visibility has been changed.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v24.2.dll
NuGet Package: DevExpress.Wpf.PivotGrid
Declaration
Event Data
The FieldAreaChanged event's data class is PivotFieldEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Field | Gets the field being processed. |
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. |
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. |
The event data class exposes the following methods:
Method | Description |
---|---|
InvokeEventHandler(Delegate, Object) | When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs. |
OnSetSource(Object) | When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs. |
Remarks
The FieldAreaChanged event occurs when a field location or visibility is changed either by an end user, or via code.
A field can be placed within one of four areas: Filter Area, Column Area, Row Area or Data Area. By default, an end user can drag a field between and within the areas. Dragging a field to the field list hides this field. Dragging the field to the field list hides this field. In this case, field’s PivotGridField.Visible property becomes false, but the PivotGridField.Area property remains unchanged. For example, you hide a field from the Data Area. The field’s PivotGridField.Area property value is still DataArea, but its PivotGridField.Visible property is changed to false.
To change the field location via code, use the PivotGridField.Area and PivotGridField.AreaIndex properties. The PivotGridField.Visible property controls the field visibility.
The FieldAreaChanged event only serves as a notification. To control the drag-and-drop of individual fields, and prevent specific fields from being dropped by an end user within a particular area, handle the PivotGridControl.FieldAreaChanging event.
The following events are raised after the FieldAreaChanged event:
- the PivotGridControl.FieldAreaIndexChanged event is raised if the field location has been changed;
- the PivotGridControl.FieldVisibleChanged event is raised if the field visibility has been changed.