Skip to main content
A newer version of this page is available. .

GridColumn.ColumnEdit Property

Gets or sets the repository item specifying the editor used to edit a column’s cell values.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v17.2.dll

Declaration

[DXCategory("Data")]
[DefaultValue(null)]
[TypeConverter("DevExpress.XtraGrid.TypeConverters.ColumnEditConverter, DevExpress.XtraGrid.v17.2.Design")]
public RepositoryItem ColumnEdit { get; set; }

Property Value

Type Default Description
RepositoryItem

null

A RepositoryItem descendant.

Remarks

Use the ColumnEdit property to assign an editor to a column or to access the assigned editor’s settings. Note that the same editor can be bound to multiple columns within the same (or different) View and it can also be used in several controls. Thus, you need to be careful when changing editor settings, since they are automatically reflected in all element and controls that use the given editor.

At design time, the ColumnEdit property provides an intuitive dialog that lists all available repository items. These are the items stored within the grid control’s internal and external repositories. Please refer to the Modify and Validate Cell Values topic for details on the repository technology.

At runtime, you can simply create the desired RepositoryItem descendant, customize its settings and assign it to the ColumnEdit property. The repository item must also be added to the grid’s internal or external repository.

You can also use the GridColumn.ColumnEditName property to bind an editor to the column. This property specifies the editor by its name. Note that the ColumnEdit and GridColumn.ColumnEditName property values are synchronized.

If an editor is not explicitly assigned to a column with the GridColumn.ColumnEditName/GridColumn.ColumnEdit properties, the column uses the default editor (according to the column’s data type). The GridColumn.RealColumnEdit property allows you to get access to the column’s actual in-place editor (default or explicitly assigned).

Example

The following example demonstrates how to assign a specific editor to a column.

using DevExpress.XtraEditors.Repository;

//Create a repository item corresponding to a combo box editor to the persistent repository
RepositoryItemComboBox riCombo = new RepositoryItemComboBox();
riCombo.Items.AddRange(new string[] {"London", "Berlin", "Paris"});
//Add a repository item to the repository items of grid control
gridControl1.RepositoryItems.Add(riCombo);
//Now you can define the repository item as an inplace editor of columns
colCity.ColumnEdit =  riCombo;   

The following code snippets (auto-collected from DevExpress Examples) contain references to the ColumnEdit property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also