Editable RadGridView with "external" buttons

1 Answer 27 Views
GridView
Ict
Top achievements
Rank 1
Ict asked on 21 Oct 2021, 01:56 PM

Hi,

I'm trying to build a screen with a RadGridView with a Save and Cancel button outside of the RadGridView itself.
The purpose would be to save the entire Grid at once to our DB and a cancel would put everything back to the "original" state.
Including, any items that might have been deleted.

Does anybody have a good working example of this kind of setup?
I've seen the document on how to handle the external buttons. https://docs.telerik.com/devtools/wpf/controls/radgridview/how-to/cancel-edit-on-lost-focus
But this still works on a row level. I'm looking for an example that takes the entire grid.

One note, we are working in an MVVM architecture!

Kind Regards
Tim

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 25 Oct 2021, 12:07 PM

Hi Tim,

The correct approach in this scenario really depends on the underlying database and technology you use.

If you're using data coming from an Entity Framework Container, for example, you can use the RadEntityFrameworkDataSource and use its SubmitChanges and Load methods to save and reset the changes. If you work directly with a DbContext instance, you can directly invoke the SaveChanges method as well.

If you would specify the exact setup at your end, I'd be happy to try and suggest a more specific solution. If you would be able to provide a small sample project which demonstrates your scenario, that would greatly aid me in doing so.

Regards,
Dilyan Traykov
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
Tags
GridView
Asked by
Ict
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or