<< Return to Main Index

< Return to Class Index

CGXGridCore::BeginTrans

virtual void BeginTrans(LPCTSTR pszDescription);

pszDescription

Points to a string with the description of the command. This string is displayed in the Undo/Redo menu item.

Remarks

Marks the beginning of a transaction-like block of commands. All subsequent commands will be undone, redone and rolled back in one step.

BeginTrans stores a CGXBlockCmd-object (an implementation specific CGXCommand-derived object which can maintain several CGXCommand objects) onto the undo-stack.

When you nest transactions in your program, you have to consider that calling Rollback aborts all transactions. Nested transactions do not store a CGXBlockCmd-object onto the undo-stack, they simply increment an internal counter.

Control-Factory Specific ->

This method has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the ImplementUndoRedo method from within the control factory class' InitializeGridComponents method will make the concrete implementation of this method available to your application.

If no concrete implementation is available this method performs no action.

END Control-Factory Specific

See Also

CGXCommand CGXGridCore::Rollback CGXGridCore::CommitTrans

CGXGridCore

Class Overview | Class Members