TTMSFNCDataGridCore.LoopThroughColumns Method
Iterates every column and invokes with the column index.
API unit family: TMSFNCDataGridCore
Declaring type: TTMSFNCDataGridCore
Syntax
procedure LoopThroughColumns(ALoopCallback: TTMSFNCDataGridLoopColumnsCallback; AIncludeFixed: Boolean = True);
void __fastcall LoopThroughColumns(_di_TTMSFNCDataGridLoopColumnsCallback ALoopCallback, bool AIncludeFixed = true);
Remarks
Hidden columns are visited too; test IsColumnHidden in the callback to skip them. Wrap the call in BeginUpdate/EndUpdate when the callback changes widths or other layout properties.
Parameters
| Name | Description |
|---|---|
ALoopCallback |
Anonymous procedure called once per column, in ascending index order. |
AIncludeFixed |
When True (default), all columns from 0 to ColumnCount - 1 are visited; when False, the fixed left and fixed right columns are skipped. Freeze columns are always visited. |
Examples
Grid.LoopThroughColumns(
procedure(AColumn: Integer)
begin
Grid.ColumnWidths[AColumn] := 120;
end);