Undo-Redo Demo

This sample illustrates the flexible undo-redo support in Essential Grid. A stack is maintained internally in Essential Grid to achieve this functionality. When you make changes to the grid, they get piled up in stack for further processing.

This architecture is extensible. enabling users to derive from either of the two abstract classes, Command or GridModelCommand, to customize the types of commands based on requirements.

In this sample, two list boxes are added to reflect the "Undo" and "Redo" buffers. This buffer support can be enabled or disabled in Essential Grid as required.

The following illustration shows the undo and redo buffers.

Undo Redo  screenshot

Features

    		this.gridControl1.CommandStack.Enabled = true;  

    		this.gridControl1.CommandStack.Undo();
    		this.gridControl1.CommandStack.Redo();