Skip to main content

TdxRichEditCustomDocumentServer.EndUpdate Method

Applies all pending changes made to the document server or its document after a BeginUpdate procedure call.

Declaration

procedure EndUpdate;

Remarks

Every time you change the document server state or edit the opened document, the server sends notifications to all its listeners (such as the document model’s internal settings, for instance) to apply the change. You can enclose the code that performs multiple changes between BeginUpdate and EndUpdate procedure calls to improve performance.

A BeginUpdate call disables notifications and postpones all changes until an EndUpdate procedure call. The IsUpdateLocked property returns True while the change notifications are disabled. A consequent EndUpdate call re-enables change notifications, applies the changes made after a BeginUpdate call, and sends the corresponding notifications in a batch.

Call CancelUpdate instead of the EndUpdate procedure to discard all pending changes and notifications. This is particularly useful if you need to implement complex atomic operations on the document server or the opened document.

Note

Ensure that every BeginUpdate call is followed by an EndUpdate or CancelUpdate procedure call, even if an exception occurs.

See Also