Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxRichEditCustomDocumentServer.CancelUpdate Method

In This Article

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

#Declaration

Delphi
procedure CancelUpdate;

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

Call the CancelUpdate procedure instead of EndUpdate 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 call, even if an exception occurs.

See Also