Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Collapse]Data Shaping
      Cell Editors Overview
      Assigning Editors to Data Field's Cells
      Assigning Editors to Individual Cells
      Assigning Editors for In-place Editing
      Preventing Editors from Being Activated
     Data Formatting
   [Expand]Data Analysis
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Design-time Features
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Assigning Editors to Individual Cells

This topic explains how to provide in-place editors for individual cells. For instance, you can specify different editors depending on a cell location or type.

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

Expanded Assigning Editors to Individual Cells

To assign editors to individual cells, handle the PivotGridControl.CustomCellEdit event. This event occurs dynamically for each visible cell, and allows you to supply editors to individual cells, depending on the cell's position.

The editor that assigned using this event is used for representing cell contents in display mode, and by default, for in-place editing. If you need to provide a different editor to be used in edit mode, refer to Assigning Editors for In-place Editing for more details.

The PivotGridControl.CustomCellEdit event's parameters allow you to identify the cell being currently processed. To provide an editor for the currently processed cell, assign a specific repository item to the event's RepositoryItem parameter. You need to add the repository items to the Pivot Grid's repository (the PivotGridControl.RepositoryItems collection).

Refer to the Repositories and Repository Items topic, for details on the repository technology.


The PivotGridControl.CustomCellEdit event is raised when view information is recalculated. Sometimes however, you may need to force editor reassignment manually. To do so, call the PivotGridControl.LayoutChanged method.

Expanded Example

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T153888.

The following code shows how to handle the PivotGridControl.CustomCellEdit event, to assign different in-place editors to different types of cells.

In the example, two in-place editors (repository items) are created to represent values of the "Quantity %" field. A ProgressBar editor is used to represent regular cell values, while a SpinEdit editor is used to represent total values for this field:

Expanded See Also

How would you rate this topic?​​​​​​​