Undo/Redo in GridView

8 posts, 0 answers
  1. Abhinav
    Abhinav avatar
    17 posts
    Member since:
    Jun 2016

    Posted 17 Oct Link to this post

    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

     

  2. Stefan X1
    Admin
    Stefan X1 avatar
    521 posts

    Posted 18 Oct Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Abhinav
    Abhinav avatar
    17 posts
    Member since:
    Jun 2016

    Posted 20 Oct in reply to Stefan X1 Link to this post

    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

  5. Stefan X1
    Admin
    Stefan X1 avatar
    521 posts

    Posted 24 Oct Link to this post

    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!
  6. Abhinav
    Abhinav avatar
    17 posts
    Member since:
    Jun 2016

    Posted 31 Oct in reply to Stefan X1 Link to this post

    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

  7. Stefan X1
    Admin
    Stefan X1 avatar
    521 posts

    Posted 03 Nov Link to this post

    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!
  8. Abhinav
    Abhinav avatar
    17 posts
    Member since:
    Jun 2016

    Posted 04 Nov in reply to Stefan X1 Link to this post

    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

  9. Stefan X1
    Admin
    Stefan X1 avatar
    521 posts

    Posted 07 Nov Link to this post

    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!
Back to Top
UI for WPF is Visual Studio 2017 Ready