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

LookUpColumnInfo Class

A column for a lookup editor.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v18.1.dll

Declaration

[TypeConverter(typeof(LookUpColumnInfoTypeConverter))]
public class LookUpColumnInfo

Remarks

The LookUpColumnInfo class represents a single column for a LookUpEdit control. The collection of columns is specified by the RepositoryItemLookUpEdit.Columns property and this represents an instance of the LookUpColumnInfoCollection class. To add a column to the collection, see the LookUpColumnInfoCollection.Add method.

The most important property of the lookup column is LookUpColumnInfo.FieldName. This refers to the field whose values are displayed in the column. You can use the property either to bind the column to a specific field in the RepositoryItemLookUpEditBase.DataSource or define the column as unbound.

A lookup editor allows you to create columns for all fields available in the RepositoryItemLookUpEditBase.DataSource. For this purpose, see the RepositoryItemLookUpEdit.PopulateColumns method.

Example

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));

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

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.

Inheritance

Object
LookUpColumnInfo
See Also