Skip to main content

TcxGridDBDataController.GetItemByFieldName(string) Method

Returns the grid item that corresponds to the specified field in the bound dataset.

Declaration

function GetItemByFieldName(const AFieldName: string): TcxCustomGridTableItem;

Parameters

Name Type Description
AFieldName string

The name of the target field in the bound dataset.

Returns

Type Description
TcxCustomGridTableItem

The grid item associated with the specified dataset field (AFieldName). The function returns nil (in Delphi) or nullptr (in C++Builder) if the parent grid View has no grid item associated with the dataset field with the specified name.

Cast the returned grid item to the corresponding TcxCustomGridTableItem class descendant to access all public API members.

Tip

You can call the returned object’s ClassType function to identify the actual grid item type.

See Also