Skip to main content
Table of Contents

TTMSFNCCustomDataGrid.AutoSizeColumns Method

Resizes every column to the width that fits its cell content.

API unit family: TMSFNCDataGrid Declaring type: TTMSFNCCustomDataGrid

Syntax

FMX.TMSFNCDataGrid.hppPascalC++
procedure AutoSizeColumns(const AMode: TTMSFNCDataGridAutoSizeMode = gamAllCells; const APadding: Integer = 5);
void __fastcall AutoSizeColumns(const TTMSFNCDataGridAutoSizeMode AMode = (TTMSFNCDataGridAutoSizeMode)(0x1), const int APadding = 0x5);

Parameters

Name Description
AMode Cells measured: gamAllCells (default) or only the cells currently on screen.
APadding Extra pixels added to each measured column width. Default 5.