Grid Undo
Hi Mercy,
Could you please post a working version of grid undo functionality.
The commandstack.undo = true works in some cases
Thank yu
SC
Could you please post a working version of grid undo functionality.
The commandstack.undo = true works in some cases
Thank yu
SC
SIGN IN To post a reply.
5 Replies
JP
Jeya Preetha M
Syncfusion Team
April 24, 2012 11:16 AM UTC
Hi Smitha,
Thanks for your interest in Syncfusion products.
Grid undo functionality is working in the current version 10.1.
Please let me know if you have any concerns.
Regards,
Jeya Preetha M
Thanks for your interest in Syncfusion products.
Grid undo functionality is working in the current version 10.1.
Please let me know if you have any concerns.
Regards,
Jeya Preetha M
SM
Smitha
April 24, 2012 04:40 PM UTC
Hi,
Do u have any working sample for the undo functionality
Sc
Do u have any working sample for the undo functionality
Sc
MC
Mercy C
Syncfusion Team
April 25, 2012 12:49 PM UTC
Hi Smitha,
Thanks for your update.
You can enable undo operation by setting "CommandStack.Enabled" property to "true".
please refer to the sample in the following link
http://www.syncfusion.com/downloads/Support/DirectTrac/93616/Undo-Redo841806248.zip
Please let me know if you have any concerns.
Regards,
Mercy.C
Thanks for your update.
You can enable undo operation by setting "CommandStack.Enabled" property to "true".
this.gridControl1.CommandStack.Enabled = true;
please refer to the sample in the following link
http://www.syncfusion.com/downloads/Support/DirectTrac/93616/Undo-Redo841806248.zip
Please let me know if you have any concerns.
Regards,
Mercy.C
SM
Smitha
April 27, 2012 05:41 PM UTC
Hi Mercy,
I am unable to reproduce your undo functionality inmy grid
Here's my code
private void frm1(object sender, EventArgs e)
{
this.theGrid.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Any;
this.theGrid.SelectCellsMouseButtonsMask = MouseButtons.Left;
contextMenu1.MenuItems.Add("Undo", new EventHandler(UndoCellsToolStripMenuItem_Click));
theGrid.Model.Options.ExcelLikeCurrentCell = true;
theGrid.Model.Options.ExcelLikeSelectionFrame = true;
theGrid.CommandStack.Enabled = true;
}
private void UndoCellsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!theGrid.CommandStack.InTransaction)
{
theGrid.CommandStack.Undo();
ShowStacks();
}
}
private void ShowStacks()
{
ShowRedoStack();
ShowUndoStack();
}
private void ShowUndoStack()
{
if (theGrid.CommandStack.UndoStack.Count != 0 && !(theGrid.CommandStack.UndoStack.Peek() is GridChangeCellsCommand))
{
theGrid.CommandStack.UndoStack.Pop();
}
if (theGrid.CommandStack.UndoStack.Count > 5)
{
theGrid.CommandStack.UndoStack.Clear();
}
}
Thank you
Smitha
I am unable to reproduce your undo functionality inmy grid
Here's my code
private void frm1(object sender, EventArgs e)
{
this.theGrid.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Any;
this.theGrid.SelectCellsMouseButtonsMask = MouseButtons.Left;
contextMenu1.MenuItems.Add("Undo", new EventHandler(UndoCellsToolStripMenuItem_Click));
theGrid.Model.Options.ExcelLikeCurrentCell = true;
theGrid.Model.Options.ExcelLikeSelectionFrame = true;
theGrid.CommandStack.Enabled = true;
}
private void UndoCellsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!theGrid.CommandStack.InTransaction)
{
theGrid.CommandStack.Undo();
ShowStacks();
}
}
private void ShowStacks()
{
ShowRedoStack();
ShowUndoStack();
}
private void ShowUndoStack()
{
if (theGrid.CommandStack.UndoStack.Count != 0 && !(theGrid.CommandStack.UndoStack.Peek() is GridChangeCellsCommand))
{
theGrid.CommandStack.UndoStack.Pop();
}
if (theGrid.CommandStack.UndoStack.Count > 5)
{
theGrid.CommandStack.UndoStack.Clear();
}
}
Thank you
Smitha
RB
Ragamathulla B
Syncfusion Team
May 4, 2012 10:54 AM UTC
Hi Smitha,
Thanks for your update.
Am afraid that am unable to reproduce your reported issue in our side and also we have the sample regarding your query please refer to the following path in our dashboard.
{InstalledPath}\Syncfusion\EssentialStudio\{Version}\Windows\Grid.Windows\Samples\2.0\MS Excel-Style Features\Undo-Redo Demo\
Let me know if you have any further concerns.
Regards,
Ragamathullah B.
Thanks for your update.
Am afraid that am unable to reproduce your reported issue in our side and also we have the sample regarding your query please refer to the following path in our dashboard.
{InstalledPath}\Syncfusion\EssentialStudio\{Version}\Windows\Grid.Windows\Samples\2.0\MS Excel-Style Features\Undo-Redo Demo\
Let me know if you have any further concerns.
Regards,
Ragamathullah B.
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
SM Smitha
- Apr 23, 2012 09:36 PM UTC
- May 4, 2012 10:54 AM UTC