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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Undo command.stack virtual grid

Thread ID:





103432 May 2,2012 10:47 PM UTC May 9,2012 06:12 PM UTC WinForms 1
Tags: GridControl
Asked On May 2, 2012 10:47 PM UTC


My gridcontrol for windows forms is not doing the undo functionality.

void GridSaveCellInfo(object sender, GridSaveCellInfoEventArgs e)
theGrid.CommandStack.Enabled = true;
if (e.ColIndex > 0 && e.RowIndex > 0)
//do something
if (e.ColIndex % 2 == 1)
// Convert a CellValue to the desired type using Syncfusion 'Convert' class.
DateTime dttm = (DateTime)GridCellValueConvert.ChangeType(e.Style.CellValue, typeof(DateTime), null);

// Debug.Assert(dttm == (DateTime)e.Style.CellValue);
//do something
// Convert a CellValue to the desired type using Syncfusion 'Convert' class.
float value = (float)GridCellValueConvert.ChangeType(e.Style.CellValue, typeof(float), null);
// Debug.Assert(value == (float)e.Style.CellValue);
//do something
e.Handled = true;

private void UndoCellsToolStripMenuItem_Click(object sender, EventArgs e)

if (!this.theGrid.CommandStack.InTransaction)

Where should i enable commandstack= true?
My grid's data is first in a middle layer(data array) and then relects in the grid.
So Any changes i make to the grid are reflceted in the data array.

Thank you

Asarudheen S [Syncfusion]
Replied On May 9, 2012 06:12 PM UTC

Hi Smitha,


Thank you for your interest in Syncfusion products,


The undo operation and the redo operation can be achieved from the CommandStack object of the GridControl, which is retrieved from the table control base.


Please refer the UG documentation from the below location:’





Also refer the forum from the below link which show case the implementation of the behavior in virtual grid:





Let me know if you have any queries.





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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon