Skip to main content

PivotGridControl.FieldAreaChanged Event

Occurs after a field location or visibility has been changed.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

public event PivotFieldEventHandler FieldAreaChanged

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. Inherited from PivotFieldEventArgsBase<T>.

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. An end user can drag a field between and within the areas. Dragging a 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.

To change the field location in code, use the PivotGridFieldBase.Area and PivotGridFieldBase.AreaIndex properties. The PivotGridFieldBase.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:

See Also