A newer version of this page is available. Switch to the current version.

LookUpColumnInfoCollection.Add(LookUpColumnInfo) Method

Adds a new column to the current collection.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v19.2.dll


public virtual int Add(
    LookUpColumnInfo column


Name Type Description
column LookUpColumnInfo

A column to add to the collection.


Type Description

The position into which the new element was inserted.


Use the Add method to add a new element to the collection. The column to add is passed as the column parameter. To add several columns at once, see the LookUpColumnInfoCollection.AddRange method.


The following code adds two columns to the RepositoryItemLookUpEdit.Columns collection of a lookup editor. For each column we initialize its field, caption and width.

using DevExpress.XtraEditors.Controls;
lookUpEdit1.Properties.Columns.Add(new LookUpColumnInfo("ID", "No", 20));
lookUpEdit1.Properties.Columns.Add(new LookUpColumnInfo("Name", "Customer Name", 80));
See Also