开发者

How to Implement Undo for Treeview

I am working in windows application. My problem is..

I have treeview & a textbox control in 开发者_JAVA百科the form. For each node text present in the textbox is saving in a database.

Currently my program is working like this. 1) Treeview_BeforeSelect() : in this method i have written the code to save the textbox data in a database. 2) Treeview_AfterSelect() : in this method i have written the code to get the data from the database & display it in a textbox.

Now i have to implement Undo for this treeview. Please suggest any ideas regarding this.


Would it be a simple as adding a time stamp field everytime you persist your data to the database? Every time you persist the treeview, you need to insert a new row and increment a version. If you want to undo, all you need to do is get the previous version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜