如何在Gridveiw上使用撤消按钮 [英] How Can I Use Undo Button On Gridveiw

查看:95
本文介绍了如何在Gridveiw上使用撤消按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在gridview上实现撤消功能

how can i achieve undo functionality on gridview

推荐答案

您的问题不明确,但是,我们可能会遇到2个案例:



1.您希望在编辑值(单元格值)后撤消:我认为,在BeginEdit上,您只需将oldValue保存到某处,最后您可以随时撤消它。



2.你想在插入/删除一行后撤消:根据情况,有很多解决方案。所以我不能给你最好的答案,但是你可以尝试将改变后的GridView与旧的DataSource进行比较,这样你就可以知道是否有任何改变并撤消它。
Your question is not clear, but, may be we will have 2 cases here :

1. You want to "Undo" after edit value (cell value) : i think, on BeginEdit, you just save the oldValue somewhere, end you can "Undo" it anytime you like.

2. You want to "Undo" after insert/delete a Row : there are many solutions for this, base on situations. So i cannot give you the best answer, but you can try to compare "after changed" GridView with your old DataSource, so you can know if anything has changed and "Undo" it back.


这篇关于如何在Gridveiw上使用撤消按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆