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

LookUpColumnInfoCollection Class

A collection of columns for a lookup editor.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v18.1.dll

Declaration

[ListBindable(false)]
public class LookUpColumnInfoCollection :
    CollectionBase,
    IEnumerable<LookUpColumnInfo>,
    IEnumerable,
    IEqualityComparer<LookUpColumnInfo>

The following members accept/return LookUpColumnInfoCollection objects:

Remarks

The LookUpColumnInfoCollection class represents a collection of columns for a lookup editor. Each column is an instance of the LookUpColumnInfo class. See the RepositoryItemLookUpEdit.Columns property to access the editor’s column collection.

For each lookup column, you need to specify its field name via the LookUpColumnInfo.FieldName property. This represents a field whose values are displayed in the column.

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 snippet (auto-collected from DevExpress Examples) contains a reference to the LookUpColumnInfoCollection 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
CollectionBase
LookUpColumnInfoCollection
See Also