This question is locked. New answers and comments are not allowed.
I have a large MVC form that needs to show various additional sets of multi-column information inline within the main form. As example the form would look something like the following:
-----------------------------------------------------------
Question 1: [________]
Question 2: [________]
Question 3:
Name | Type | Yes / No
(Edit / Delete)
(Edit / Delete)
(Insert)
Question 4: [________]
Question 5:
When | Where | Yes / No
(Edit / Delete)
(Edit / Delete)
(Insert)
etc...
[Submit]
-----------------------------------------------------------
For questions 3 and 5, my obvious first choice was to use the Telerik MVC grid, until I realised (of course) that it is generating it's own form tags. I moved the grid outside the main @using (Html.BeginForm()) and everything worked expected, but of course the questions are no longer listed in the correct order.
I am also unable to switch to Ajax mode because a) my child objects are self-referencing and thus generate a serialization error (could overcome this with a ViewModel but would like to avoid this if possible) and b) from what I have read elsewhere on the forums, certain operations will always generate a form tag (delete and update?) and I need these behaviours on the grid.
Can anyone tell me of a good strategy to achieve something like the above with the Telerik MVC grid, whilst retaining use of the default model binder if possible?
The only alternative I can think of at the moment would be to not use the MVC grid and instead create custom edit / display templates for each multi-value question, whereby the insert would generate a new table row via jQuery that contained standard textboxes / dropdowns etc, but this is obviously going to involve a lot more work / code...
Regards,
Dan.
-----------------------------------------------------------
Question 1: [________]
Question 2: [________]
Question 3:
Name | Type | Yes / No
(Edit / Delete)
(Edit / Delete)
(Insert)
Question 4: [________]
Question 5:
When | Where | Yes / No
(Edit / Delete)
(Edit / Delete)
(Insert)
etc...
[Submit]
-----------------------------------------------------------
For questions 3 and 5, my obvious first choice was to use the Telerik MVC grid, until I realised (of course) that it is generating it's own form tags. I moved the grid outside the main @using (Html.BeginForm()) and everything worked expected, but of course the questions are no longer listed in the correct order.
I am also unable to switch to Ajax mode because a) my child objects are self-referencing and thus generate a serialization error (could overcome this with a ViewModel but would like to avoid this if possible) and b) from what I have read elsewhere on the forums, certain operations will always generate a form tag (delete and update?) and I need these behaviours on the grid.
Can anyone tell me of a good strategy to achieve something like the above with the Telerik MVC grid, whilst retaining use of the default model binder if possible?
The only alternative I can think of at the moment would be to not use the MVC grid and instead create custom edit / display templates for each multi-value question, whereby the insert would generate a new table row via jQuery that contained standard textboxes / dropdowns etc, but this is obviously going to involve a lot more work / code...
Regards,
Dan.