Version

Methods and Properties Reference for Performing Transactions

Topic Overview

Purpose

This topic lists the available methods and properties for performing undo/redo transactions.

Required background

The following table lists the topics required as a prerequisite to understanding this topic.

Topic Purpose

This topic lists some of the important properties and methods of the UndoManager class.

Methods and Properties Reference for Performing Transactions

Introduction

In some cases, you may want to unite several end-user operations into one entry that will be recorded in the undo/redo history. This can be achieved using the transactions in the Infragistics Undo/Redo Framework™.

Note
Note:

The Undo/Redo methods cannot be invoked while a transaction is open or an exception will be thrown.

Methods reference summary

The following table summarizes the purpose and functionality of the methods related with performing transactions.

Method Description

Creates and start a transaction. This is an UndoManager method and returns UndoTransaction as a result. Once the transaction is started, any changes that are added to the UndoManager will be added to that transaction.

Nested transactions can be created by invoking the StartTransaction method while a transaction is still in progress.

Closes the transaction as well as any open nested transactions within it and the transaction is added to the undo/redo history.

The Commit method can only be invoked while the transaction is still opened. Once the transaction is closed, its property IsClosed returns T rue and invoking the method results in an exception.

Closes the transaction and reverses the actions that had happened up to that point while the transaction was open.

The Rollback method can only be invoked while the transaction is still opened. Once the transaction is closed, its property IsClosed returns True and invoking the method results in an exception.

Executes a specified Action within a transaction.

If an exception occurs while the transaction is in progress, the Rollback method is invoked. Otherwise, the Commit method is invoked.

Properties reference summary

The following table summarizes the purpose and functionality of the properties related with performing transactions.

Property Description

Returns the current open root UndoTransaction.

If there is no open transaction, the method returns null .

Returns the current open leaf UndoTransaction.

Returns a boolean value indicating if the UndoManager is performing a Rollback of an UndoTransaction.

Returns a boolean value indicating if the transaction has been closed.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic lists the available methods for adding an UndoUnit derived class object to the undo history.

This topic lists the available methods for removing the UndoUnit instances from the undo/redo history.

This topic lists the methods that register/unregister a specific object to an UndoManager instance.

This topic lists the available methods for performing undo and redo operations.

This topic lists the available methods and properties related to the merging of undo/redo operations.

This topic lists the available methods for suspending and resuming the saving of the undo/redo operations in history.

This topic lists the available methods and properties related to creating of a custom UndoUnit in the Infragistics Undo/Redo Framework™.