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

LookUpColumnInfo Class

A column for a lookup editor.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

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

#Inheritance

Object
LookUpColumnInfo
See Also