Vcl.DBGrids.TCustomDBGrid.LayoutLock

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property LayoutLock: Byte read FLayoutLock;

C++

__property System::Byte LayoutLock = {read=FLayoutLock, nodefault};

Properties

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

Description

Counts the number of times BeginLayout has been called without an EndLayout or CancelLayout call.

Use LayoutLock to determine when the column bindings change. Whenever a column width or binding changes or the fields in the data source change, the BeginLayout method is called. BeginLayout increments LayoutLock to keep track of the fact that the column bindings are changing. When changes are complete, the EndLayout method is called. EndLayout decrements LayoutLock. When LayoutLock returns to 0, the data-aware grid knows that all changes are complete, and the Fields and Columns properties are updated.

See Also