Vcl.DBGrids.TCustomDBGrid.BeginLayout

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure BeginLayout;

C++

void __fastcall BeginLayout();

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TCustomDBGrid

Description

Increments the LayoutLock property when the column bindings or fields in the dataset change.

Applications cannot call this protected method. Data-aware grids call BeginLayout internally before making changes to the Columns property or any of the individual TColumn objects in Columns. Once the change is complete, the data-aware grid calls EndLayout. If the response to the change must be canceled or postponed, the grid calls CancelLayout.

Each call to BeginLayout increments the LayoutLock property. Each call to EndLayout or CancelLayout decrements the LayoutLock property. If LayoutLock returns to 0 in a call to EndLayout, the Fields property is updated to match both the bindings of the Columns property and the fields available in the dataset. The Columns property is then updated in turn to match the Fields property. This ensures that the Columns property matches both the specified column bindings and the fields available in the dataset.

See Also