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

Saving grid data upon form close

1 Answer 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brian Thomas
Top achievements
Rank 1
Brian Thomas asked on 30 Dec 2009, 09:50 PM
What is the best way to handle this situation?

I have a master grid and its child data is accessed through the RowDetailsTemplate which is pointing to a customized UserControl. Inside the UserControl is a tab control with a grid inside each tab. When a child grid is in edit mode and the form is closed, the grid's rowEditEnded event doesn't fire. The rowEditEnded event is where I tell my program to post/save the row's data.

So, how am I suppose to save the data of that row? Should I expose a function of the user control and have the WPF call it when closing?

Thank You.

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan Dobrev
Telerik team
answered on 05 Jan 2010, 08:22 AM
Hi Brian,

I think that the best way to implement this is exactly what you have suggested. Expose a method on your user control let say CommitEdit() that will call the respective CommitEdit() method of the RadGridView.

P.S.: There are other ways to achieve this for example using Event Aggregator pattern from Prism.

Hope this helps,
Stefan Dobrev
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
Brian Thomas
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or