This is a migrated thread and some comments may be shown as answers.

Undo Functionality in Grid

1 Answer 589 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jorge Gonzalez
Top achievements
Rank 1
Jorge Gonzalez asked on 21 Dec 2009, 02:58 PM
Hello,
    I've implemented an undo capability into the grid. If a user changes the value of a field but they want to reverse the change they will click on the undo button and the change is undone. This undo functionality remembers only the last change. I've implemented this using List's and by clearing out the grid and re-building the grid using the data in the lists. It works but it's slow. Imagine re-building a 2000 row X 800 column grid. I tried saving the previous state of the data in the grid in another datatable and then getting rid of the current datatable and making this datatable the current one but I ran into many problems. Because rows and columns can be deleted the datatable rejectchanges() function is of no use.

Any ideals would be appreciated.

Thanks

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 23 Dec 2009, 01:50 PM
Hi Jorge Gonzalez,

In the attachment you will find simple example that demonstrates how how you can implement undo functionality without need to saving/restoring all the data you display rather than keeping track only on the particular changes that user had made.

Hope this works for you.

Kind regards,
Tsvyatko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Jorge Gonzalez
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or