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

Undo/Redo in GridView

7 Answers 672 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Abhinav
Top achievements
Rank 1
Abhinav asked on 17 Oct 2016, 09:31 PM

Hi,

We would like our users to perform "undo/redo" in the GridView (at the very least, "undo") as in Excel where users can "undo/redo" changes in each cell.

Could you please help in providing an example of how to accomplish this scenario?

We are using MVVM with observable properties and observable collections.

 

Kind regards

 

7 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 Oct 2016, 12:44 PM
Hello Abhinav,

There is no out-of-the-box functionality for satisfying this requirement. A possible solution might be to adopt the approach demonstrated in the Undo Functionality in Grid forum thread.

Hopefully, it helps.

Best Regards,
Stefan X1
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Abhinav
Top achievements
Rank 1
answered on 20 Oct 2016, 09:45 PM

Hi Stefan X1,

Thank you for your reply. We use a model (list of objects) as the data source instead of DataTable.DefaultView. Is there a recommended way to incorporate the attached demo using a model that we bind to instead of a DataTable? For example, binding the ItemSource of the gridview to a ObservableCollection or other collection of objects via MVVM?

Example XAML:

<telerik:RadGridView Grid.Row="1" 
                             Name="dtgMyData" 
                             ItemsSource="{Binding Path=MyData}"

...

Will Telerik release a version of the gridview that supports undo/redo, as this is a common request for users?

 

Kind regards

0
Stefan
Telerik team
answered on 24 Oct 2016, 12:08 PM
Hello Abhinav,

Thanks for clarifying this.

Speaking in general, you should be able to implement the same approach with an ObservableCollection, as it supports inserting/removing items at specific index.

As to having this functionality built-in for RadGridView, I do agree that this would be a nice feature. I will log it in our backlog for future implementation. Before that, may I ask you to share some additional information regarding your exact setup and usage of the control, so I can add it as a comment in the item in our system if needed?

Thanks in advance for your cooperation.

Regards,
Stefan X1
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
0
Abhinav
Top achievements
Rank 1
answered on 31 Oct 2016, 08:44 PM

Hi Stefan X1,

Thanks for your suggestions.

We are currently using WPF/MVVM/Prism/Unity with Telerik for WPF version 2016.2.613.45.

We have ObservableCollections bound to the ItemSource of the Datagrid, with Observable properties, implementing INotifyProperyChanged (via Prism's BindableBase). We are using the "Extended" selection mode of the RadGridView with a "Mixed" SelectionUnit. We are utilizing both SelectedItems and SelectedCells and have implemented a custom feature for copy/paste and programmatic filtering functionality for a large amount of records (1M+). We'd like to implement and undo/redo feature on the RadGridView, where users can type Ctrl-Z/Ctrl-Shift-Z (for example), and have the history of changes undone/redone in each cell that was modified - our users may modify large amounts of data all at once by issuing the custom copy/paste command. We'd like to stay with a Pure MVVM approach as much as possible.

Please let me know if you'd like additional information.

 

Kind regards

0
Stefan
Telerik team
answered on 03 Nov 2016, 02:19 PM
Hi Abhinav,

Thank you for the detailed information regarding your setup.

With regard to it I have logged this feature request in our backlog. You can track its state in the Feedback Portal: Implement Undo/Redo functionality.

In case you have any more questions or concerns, feel free to approach me.

Regards,
Stefan X1
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
0
Abhinav
Top achievements
Rank 1
answered on 04 Nov 2016, 06:36 PM

Hi Stefan X1,

Thank you very much for adding the request to your backlog.

Would any timeline estimates be available for this feature?

 

Kind regards

0
Stefan
Telerik team
answered on 07 Nov 2016, 09:44 AM
Hello Abhinav,

As this is a relatively big task, we would not be able to implement it for the next official release. Hopefully, we would manage to do so for one of the next ones, but I am afraid that I cannot commit myself to a certain time frame.

Regards,
Stefan X1
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Tags
GridView
Asked by
Abhinav
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Abhinav
Top achievements
Rank 1
Share this question
or