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

Guidance Needed: Child Collection on Create View

2 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 30 Jan 2014, 01:27 AM
I have a general question.
I'm new to Kendo and have a need to build a single page data entry view which will create a new object, it's properties, and a couple of child collections of objects. For example:

Retailer.<various properties>
Retailer.PhoneNumbers.PhoneNumber
Retailer.PaymentsAccepted.PaymentType

My question is this: When I create the new retailer (ie: Create action on the Retailer controller) will I have an issue using a grid to create my phone numbers? Does the grid want to post back with each update of a new line or can I post the collection of phone numbers back when the form is submitted?

Functionality similar to the inline editing grid sample: Grid sample

My stack is MVC 5, EF 6 and Kendo UI Complete w/MVC Wrappers

Thank you for any guidance!

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 30 Jan 2014, 07:16 PM
To simplify my question, is there a way to have the grid simply post back an array with the full form submit instead of making a hit to the server on item add?
0
Petur Subev
Telerik team
answered on 03 Feb 2014, 07:50 AM
Hello Richard,

The Kendo Grid provides you with the ability to edit collection of items and it does not support creating/editing of a nested collection.

To edit a nested collection we recommend using the hierarchy approach like shown in this demo and also editing is demonstrated in this code library article.

Although the Grid is not intended to edit of a nested collection you can work-around it and partially make it work using the approach covered in this code library.

Also please notice that when used a create page the Grid will not send its changed to the server when the form is submitted. The Grid uses its own transport and it will do separate ajax request request, the only work-around we could suggest to send the changes to the server is to use hidden input fields in the client template of the columns like demonstrated in this code library.

I hope this information helps.

Let us know if any particular questions arise.

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or