[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'DBGrids' (#lcl)

# TCustomDBGrid.HeaderSized

Updates Columns in the control when a a header cell is resized.

## Declaration

Source position: dbgrids.pas line 484

`protected procedure TCustomDBGrid.HeaderSized(`
`IsColumn: Boolean;`
`Index: Integer`
`); override;`

## Arguments

`IsColumn` |  | Sizing applies to a column and not a row.
`Index` |  | Ordinal position for the column.

## Description

HeaderSized is an overridden procedure which updates the Columns for the control when a header cell is resized. If IsColumn contains False the resize operation was for the height of a header row and no action is performed in the method. When IsColumn contains True the request applies to the width of the column with the Field at the position specified in Index.

HeaderSized calls the ColumnIndexFromGridColumn method to determine the position in the Columns collection for the Field specified in Index. The width in Columns is updated with the corresponding value from ColWidths. HeaderSized sets the value in DefaultColWidths to False to indicate that custom column sizing has been applied to the control.

HeaderSized signals the OnColumnSized event handler when assigned for the control.

## See also

TCustomGrid.HeaderSized |  | Performs actions needed when a column or a row has been resized.