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

LookUpColumnInfoCollection Class

A collection of columns for a lookup editor.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

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

The following members 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));

#Inheritance

Object
CollectionBase
LookUpColumnInfoCollection
See Also