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

Edit multiple models in one UI

1 Answer 281 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 24 Jun 2015, 09:56 PM

I've searched around but haven't found a concise example for this yet.

I have an object graph with nested data such as coming from Entity Framework
Parent
    Multiple Children
          Multiple Children

I need to provide the user a way to modify/create the parent as well as the children in as simple a way as possible in a single UI. How can I accomplish this using Kendo MVC with MS MVC 5? If possible I'd rather not manually create a ViewModel and have to do translation between the object graph and the ViewModel. If that's the only solution then I guess that's what I have to do but I was hoping to be able to use the EF model directly. Any suggestions are greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 26 Jun 2015, 02:27 PM
Hi Matthew,

All editing features and interfaces, which Kendo UI provides out-of-the-box, work with "linear" data items, no matter if editing on multiple items is performed separately or simultaneously.

Even if you have Grid hierarchy, editing in the master and child Grids is independent.

In short, yes, you will probably need a ViewModel. There is one exception - if you use a popup edit template for the Grid, you will be able to display the "parent" data in the Grid, and edit both "parent" and "children" data in the popup edit template.

http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/how-to/editing/custom-popup-editor

Regards,
Dimo
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Matthew
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or