Skip to main content

TcxCustomTreeList.ColumnByName(string) Method

Provides access to a tree list column by its name.

Declaration

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