Assigning Editors to Data Field's Cells

  • 2 minutes to read

This topic describes how to assign editors to cells corresponding to data fields. When assigning editors in this manner, data editing is enabled for all cells of the target data field. If you need to provide editors only for specific cells, you can use the solution described in the Assigning Editors to Individual Cells topic.

For general information on providing in-place editors for cells, see Cell Editors Overview.

Assigning Editors to Data Field's Cells

To specify an in-place editor for data field cells, create a specific repository item, add it to the pivot grid's repository (the [DevExpress.XtraPivotGrid.PivotGridControl.RepositoryItems]((xref:DevExpress.XtraEditors.Container.EditorContainer.RepositoryItems) collection) and then assign it to the data field using the PivotGridField.FieldEdit property.

At design time, you can choose the required repository item using the PivotGridField.FieldEdit property in the Properties window. This property provides a design-time dropdown editor listing all available editor types. If you create a new repository item, it is automatically added to the control's repository.

The image below shows how to access a data field's PivotGridField.FieldEdit property by clicking on a field header and accessing the property in the Properties window.



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();
fieldPercents.FieldEdit = riProgressBar;