Skip to main content
Table of Contents

TTMSFNCDataGrid.AddGrid Method

Embeds a nested sub-grid renderer in the specified cell and returns it for further configuration.

API unit family: TMSFNCDataGrid Declaring type: TTMSFNCDataGrid Inherited from: TTMSFNCCustomDataGrid

Overloads

Overload 1

Embeds a nested sub-grid renderer in the specified cell and returns it for further configuration.

FMX.TMSFNCDataGrid.hppPascalC++
function AddGrid(ACell: TTMSFNCDataGridCellCoord): TTMSFNCDataGridRenderer; overload;
TTMSFNCDataGridRenderer* __fastcall AddGrid(const TTMSFNCDataGridCellCoord &ACell)/* overload */;

Remarks

The nested renderer is owned by the cell; do not free it. Use RemoveGrid to destroy it. Size the host cell (row height / column width) so the sub-grid has room to render.

Parameters

Name Description
ACell The cell coordinate where the sub-grid is embedded.

Returns

The nested renderer. When the cell already hosts one, the existing renderer is returned; nil when the coordinate is not a valid cell.

Overload 2

Embeds a nested sub-grid renderer in the cell at the given column and row and returns it for further configuration.

FMX.TMSFNCDataGrid.hppPascalC++
function AddGrid(AColumn, ARow: Integer): TTMSFNCDataGridRenderer; overload;
TTMSFNCDataGridRenderer* __fastcall AddGrid(int AColumn, int ARow)/* overload */;

Remarks

The nested renderer is owned by the cell; do not free it.

Parameters

Name Description
AColumn Zero-based column index of the target cell.
ARow Zero-based row index of the target cell.

Returns

The nested renderer; the existing one when the cell already hosts a sub-grid, or nil when the coordinate is not a valid cell.