PivotGridField.FieldEdit Property
Gets or sets the editor used to edit cells corresponding to the current data field.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v24.1.dll
NuGet Package: DevExpress.Win.PivotGrid
Declaration
Property Value
Type | Default | Description |
---|---|---|
RepositoryItem | null | A RepositoryItem descendant that represents the field’s repository item. |
Remarks
Use the FieldEdit property to assign a repository item to cells corresponding to a specific data field. Once assigned, the editor controls the apperance of cell values in display and edit modes.
If you assign an in-place editor (repository item) in code, ensure that the repository item is added to the DevExpress.XtraPivotGrid.PivotGridControl.RepositoryItems collection. Otherwise, the grid control will not be correctly updated when changing the repository item’s settings.
Note that data editing is enabled for a data field’s cells if the control’s PivotGridOptionsCustomizationEx.AllowEdit and the field’s PivotGridFieldOptionsEx.AllowEdit options are set to true.
You can provide in-place editors for individual cells. This can be accomplished by handling the PivotGridControl.CustomCellEdit and/or PivotGridControl.CustomCellEditForEditing events.
To save changes made by an end-user via cell editors, handle the PivotGridControl.EditValueChanged event.
Example
The following example shows how to assign an in-place editor to cells of a specific data field, via the PivotGridField.FieldEdit
property. The assigned in-place editor (ProgressBar) controls the representation of cells in display mode:
using DevExpress.XtraEditors.Repository;
RepositoryItemProgressBar riProgressBar = new RepositoryItemProgressBar();
pivotGridControl1.RepositoryItems.Add(riProgressBar);
fieldPercents.FieldEdit = riProgressBar;