Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Grid View
   [Expand]View Technology
   [Expand]Grouping
   [Expand]Sorting
   [Expand]Summaries
   [Collapse]Data Editing
    [Expand]Edit Form
    [Expand]Editing via Code
    [Collapse]In-place Editors
      In-place Editors Overview
      Assigning Editors for In-Place Editing
      Assigning Editors to Columns and Card Fields
      Assigning Editors to Individual Cells
      Showing and Hiding Editors
    [Expand]Input Validation
    [Expand]New Item Row
     Tutorial: Add or Remove Rows
     Tutorial: Data Input Validation
   [Expand]Filtering and Locating Rows
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Expand]Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Hints
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [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]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Assigning Editors for In-Place Editing

This topic covers information related to assigning an editor to a column that will be used only for in-place editing. For general information on in-place editors, see In-place Editors Overview.

Expanded Online Videos

Expanded Assigning Editors for In-Place Editing

In-place editors can be assigned to columns or individual cells to display and edit data in a specific manner. An editor can be assigned to a column via the GridColumn.ColumnEdit property, and to a particular cell - via the GridView.CustomRowCellEdit event. By default, this editor will be used to represent cell values in display mode, and when an end-user starts editing, the same editor will be activated.

Sometimes you may need to use a specific editor to represent data in display mode, but a different editor for in-place editing. To do this:

The GridView.CustomRowCellEditForEditing event fires when an end-user is about to start editing. Its Column and RowHandle parameters identify the current cell. To provide an editor for editing, assign a corresponding RepositoryItem descendant to the event's RepositoryItem parameter. Note that the repository item used must belong to the grid control's RepositoryItems collection (see the EditorContainer.RepositoryItems property) or to an external repository (see the EditorContainer.ExternalRepository property).

Expanded Example

The following example demonstates how to assign different in-place editors to a column that will be used in display and edit modes respectively.

Assume that a grid column displays integer values that should be represented by a progress bar in display mode. In edit mode, a cell's value must be edited by a spin editor. To implement this task, a ProgressBar in-place editor must be assigned as the default editor to the column via the GridColumn.ColumnEdit property. This editor will be used to represent data in display mode. To provide a custom editor that will be used for in-place editing, the GridView.CustomRowCellEditForEditing event is handled.

The following image illustrates the result:

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