Vcl.DBGrids.TCustomDBGrid.DeferLayout

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DeferLayout;

C++

void __fastcall DeferLayout();

Properties

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

Description

Decrements the LayoutLock property and posts a message to the grid to trigger a new layout sequence at a more appropriate time.

Applications cannot call this protected method. Data-aware grids call DeferLayout internally to postpone the recomputation of the Columns property after the dataset changes when it is inappropriate to recompute columns immediately.

DeferLayout calls CancelLayout to decrement the LayoutLock property, which was incremented in response to the change in the dataset. It then posts a message to the grid, which triggers another layout attempt at a later point in time. When the message is received, the grid calls BeginLayout and then either EndLayout or DeferLayout, depending on whether it is an appropriate time to proceed with the computation of Columns.

See Also