We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Undo/Redo in a GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

69291 Oct 23,2007 01:52 AM Oct 24,2007 01:55 PM Windows Forms 1
loading
Tags: GridControl
Keshav Kamat
Asked On October 23, 2007 01:52 AM

Hello,

I am using a syncfusion GridControl and have set gridControl1.Model.CommandStack.Enabled = true; yet I am not able to implement undo /redo after editting a cell in the grid.
How should i go about implementing the same?

Administrator [Syncfusion]
Replied On October 24, 2007 01:55 PM

Hi Keshav,

Thank you for your interest in Syncfusion products.

To enable Undo/Redo for the current cell in the GridControl , please try setting the following codesnippet.

[C#]
this.gridControl1.CommandStack.Enabled = true;


private void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Z && ((e.Modifiers & Keys.Control) != 0))
{
if (this.gridControl1.CurrentCell.IsEditing)
{
this.gridControl1.CurrentCell.EndEdit();
this.gridControl1.CommandStack.Undo();
}
}

Please refer the sample that illustrates the same.

http://websamples.syncfusion.com/samples/Grid.Windows/F69291/main.htm

Please let me know if you have any other queries.

Regards,
Jaya

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;