Field List Overview
- 2 minutes to read
The Field List allows end users to add and remove fields from a pivot grid at runtime. They can also use it to rearrange fields in pivot grid areas, sort and filter data.
Availability
Use the PivotGridControl.AllowCustomizationForm property to specify whether end users are allowed to invoke the Field List.
Invoke the Field List
An end user can invoke the Field List from the header area context menu. To do this in code, use the PivotGridControl.ShowFieldList method. The PivotGridControl.HideFieldList method allows you to hide the Field List.
After the Field List is invoked or closed, PivotGridControl raises the PivotGridControl.ShownFieldList or PivotGridControl.HiddenFieldList event, respectively.
Hide Fields
To hide a field from the pivot grid, drag its header and drop it within the Field List’s client area. When end users move fields to the Field List, the field’s visibility is changed, but the field’s area remains unchanged. To return the field to the pivot grid, drag its header from the Field List to a pivot grid’s header area (e.g., Data Header Area, Row Header Area).
Use the PivotGridControl.AllowHideFields property to specify whether fields can be dropped onto the Field List, and the PivotGridControl.AllowDragInCustomizationForm property (or PivotGridField.AllowDragInCustomizationForm for individual fields) to specify whether fields can be dragged out of the Field List or between its sections.
You can prevent a field from appearing within the Field List when the field is hidden. To do this, set the PivotGridField.ShowInCustomizationForm property to false.
Display Visible Fields in the Field List
You can also display visible fields together with hidden ones. In this instance, a check box is shown near each field allowing you to show or hide this field.
To specify whether visible fields are shown in the Field List, use the PivotGridControl.FieldListIncludeVisibleFields property.
Search Fields
The built-in search box allows users to search against multiple fields and folders.
Advanced Capabilities
To learn about advanced Field List capabilities, see the following topics.