IDataGridBandBase.AutoWidth

Syntax

AutoWidth: Integer;

Description

The AutoWidth property determines the percent value of client area of the DataGrid component that a child component (container or column) occupies.

Comments

By default this property is set to zero, and container or column width is fixed and equals the value set in the Width property. If the AutoWidth property value differs from 0, the width is calculated automatically and it changes proportionally when changing sizes of the DataGrid component.

Example

Properties are set by default:

If the following values are set:

DataGrid1.Columns.Item(0).AutoWidth := 25;

DataGrid1.Columns.Item(1).AutoWidth := 25;

DataGrid1.Columns.Item(2).AutoWidth := 50;

The table will look as follows:

See also:

IDataGridBandBase