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

TcxCustomTreeList.ColumnByName(string) Method

Provides access to a tree list column by its name.

#Declaration

Delphi
function ColumnByName(const AName: string): TcxTreeListColumn;

#Parameters

Name Type Description
AName string

Specifies the required column’s name.

#Returns

Type Description
TcxTreeListColumn

A tree list column whose name is passed as the AName parameter.

The ColumnByName function returns nil (in Delphi) or nullptr (in C++Builder) if the Tree List control has no column with the specified name.

The returned object can be a TcxTreeListColumn or TcxDBTreeListColumn class instance depending on the actual tree list column type. In the latter case, you need to cast the returned object to the TcxDBTreeListColumn class to access all available public API members.

Tip

To identify the actual tree list column type, call the returned object’s ClassType function.

#Remarks

Call the ColumnByName function to access a tree list column by its name. To access all tree list columns by their indexes, use the Columns property instead.

See Also