Skip to main content

TdxCustomSpreadSheet.BeginUpdate(TcxLockedStateImageShowingMode) Method

Disables repainting of the Spreadsheet control.

Declaration

procedure BeginUpdate(AMode: TcxLockedStateImageShowingMode = lsimNever);

Parameters

Name Type
AMode TcxLockedStateImageShowingMode

Remarks

Each time the spreadsheet document’s content is changed, the Spreadsheet control initiates repainting to reflect these changes. The list of operations resulting in the control repainting includes worksheet management, importing/exporting spreadsheet document data, data cells management within the active worksheet, etc.

To improve the performance of a spreadsheet-based application, enclose the code that performs multiple spreadsheet document modifications within the BeginUpdate/EndUpdate procedure blocks. For time-consuming operations, you can optionally pass lsimPending or lsImmediate as the AMode parameter of the BeginUpdate procedure in order to display a “Locked View“ image.

The BeginUpdate procedure postpones updates. To apply the changes made, invoke the EndUpdate procedure. Ensure that every call to BeginUpdate is followed by a call to the EndUpdate procedure, even if an exception occurs.

Note

In addition to the “global” BeginUpdate/EndUpdate procedures, individual worksheets, floating containers, table item groups, and even cell objects provide their own BeginUpdate/EndUpdate procedure sets.

See Also