Back to Devexpress

PivotGridField.FieldEdit Property

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridfield-5988e062.md

latest4.6 KB
Original Source

PivotGridField.FieldEdit Property

Gets or sets the editor used to edit cells corresponding to the current data field.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
[DefaultValue(null)]
public virtual RepositoryItem FieldEdit { get; set; }
vb
<DefaultValue(Nothing)>
Public Overridable Property FieldEdit As RepositoryItem

Property Value

TypeDefaultDescription
RepositoryItemnull

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:

csharp
using DevExpress.XtraEditors.Repository;

RepositoryItemProgressBar riProgressBar = new RepositoryItemProgressBar();
pivotGridControl1.RepositoryItems.Add(riProgressBar);
fieldPercents.FieldEdit = riProgressBar;
vb
Imports DevExpress.XtraEditors.Repository

Dim riProgressBar As RepositoryItemProgressBar = new RepositoryItemProgressBar()
pivotGridControl1.RepositoryItems.Add(riProgressBar)
fieldPercents.FieldEdit = riProgressBar

See Also

EditValueChanged

CustomCellEdit

CustomCellEditForEditing

PivotGridOptionsCustomizationEx.AllowEdit

PivotGridFieldOptionsEx.AllowEdit

PivotGridOptionsView.ShowButtonMode

PivotGridFieldOptionsEx.ShowButtonMode

Cell Editors Overview

PivotGridField Class

PivotGridField Members

DevExpress.XtraPivotGrid Namespace