Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Assign an editor to a column

The following example demonstrates how to create and adjust a new in-place editor (ComboBoxEdit). The editor is bound to the “Location” column using the TreeListColumn.ColumnEdit property.

The screenshot below demonstrates the result of the code’s execution

ColumnEdit - Assign to column

using DevExpress.XtraEditors.Repository;

//Create a repository item corresponding to a combo box editor.
RepositoryItemComboBox riCombo = new RepositoryItemComboBox();
riCombo.Items.AddRange(new string[] {"San Francisco", "Monterey", "Toronto", "Boston", "Kuaui", "Singapore", "Tokyo"});
//Add the item to the internal repository
treeList1.RepositoryItems.Add(riCombo);
//Now you can define the repository item as an in-place column editor
columnLocation.ColumnEdit =  riCombo;