AutoWidth: Integer;
The AutoWidth property determines the percent value of client area of the DataGrid component that a child component (band or column) occupies.
The property is set to zero by default, and band 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.
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: