在Win窗体中撤消DataGridVew Control中的更改 [英] Undo changes in DataGridVew Control in Win forms
本文介绍了在Win窗体中撤消DataGridVew Control中的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要的功能将撤消最后几个更改,例如行删除,我们在 DataGridView中进行的多个单元格值更改控制。
我这样做是为了复制,粘贴而不是用于撤销。
请帮助我。
Hi,
I want the functionality which will undo the last few changes like Row delete, multiple cell value changes which we did in DataGridView control.
I did it for Copy, Paste but not getting it for Undo.
Please help me.
推荐答案
DataSet.RejectChanges方法回滚自创建以来对DataSet所做的所有更改。
请参阅 http://msdn.microsoft.com/en- us / library / system.data.dataset.rejectchanges.aspx [ ^ ]
DataSet.RejectChanges Method Rolls back all the changes made to the DataSet since it was created .
see http://msdn.microsoft.com/en-us/library/system.data.dataset.rejectchanges.aspx[^]
嗨Rajgai
请点击以下链接它会有所帮助。
http://stackoverflow.com/questions/1623937/how-to-implement-undo-operation-in-datagridview [ ^ ]
http://stackoverflow.com/questions/ 2460284 /如何回滚 - 在网格视图中更改错误输入 [ ^ ]
谢谢和问候,
Sathish
Hi Rajgai
please follow below links it would help.
http://stackoverflow.com/questions/1623937/how-to-implement-undo-operation-in-datagridview[^]
http://stackoverflow.com/questions/2460284/how-to-roll-back-changes-in-gridview-in-case-of-incorrect-input[^]
Thanks and Regards,
Sathish
这篇关于在Win窗体中撤消DataGridVew Control中的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文