Table of Contents

TTMSFNCDataGrid.AutoSizeColumn Method

Resizes the specified column to fit its widest content.

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

Syntax

procedure AutoSizeColumn(AColumn: Integer; const AMode: TTMSFNCDataGridAutoSizeMode = gamAllCells; const APadding: Integer = 5);

Parameters

Name Description
AColumn Zero-based column index to resize.
AMode Determines which cells are measured (all cells, visible only, etc.).
APadding Extra padding in pixels added beyond the measured content width.