- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All Topicshi,
I am currently working in application,I loaded MS_access database into datagridview using oledb connection there i have written code for insert,delete,update .
For Example: IN Ms Word when we click CTl+Z any previously made changes would be restored.
Just like this any previous changes made in the datagridview should be restored using either button or CTRL+Z keys.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: AkshPosted on 2009-11-01 at 22:37:44ID: 25717431
Hi,
om/kb/8392 01 om/kb/3205 84 (More sophisticated approach)
There is no "out of box" functionality available to achieve this.
What you can do is:
1. Create event handler to capture Ctrl+Z key event.
URL: http://support.microsoft.c
http://support.microsoft.c
2. In the grid, whenever end-user edits/deletes something, do not do any operation in the database. Instead of that, just mark the data-records with operation-index and operation-type in dataset only. (I am assuming that you are binding the grid with dataset).
2.1 Operation-Index: An integer field in the data-table whose value is in incremental order.
2.2 Operation-Type: A char flag which indicates what had happened to "this" row, i.e. "D" - Delete or "E"-Edit
2.3 Initially set the every index with 0 and operation-type to empty.
2.4 As end-user edits/delete something, increment the index with the previous highest value and set the operation-type flag.
2.4 Now, if user applies ctrl+z, then pick the highest index and replace that row's value from its original value from the database.
3. At the end of the grid, give button like.. "Confirm Change" or something like that... And on the click of that button, save/delete whatever record from the dataset.
I guess, some can also suggest the inner availability of the data-row status. But, anyways still you require the operation-index.
I hope, I sound reasonable on this.
Happy programming,
Aksh