It's kind of messy. What I did was create 3 hidden fields on my form. In the document ready function I have this code:
grid = $(
In the view model I exclude those three fields so the model binder won't try to bind them to the collections.
Then in the controller in the edit POST action I have:
model.BudgetVersionDeleted = jss.Deserialize<List<EntityBudgetVersionViewModel>>(Request[
model.BudgetVersionInserted = jss.Deserialize<List<EntityBudgetVersionViewModel>>(Request[
model.BudgetVersionUpdated = jss.Deserialize<List<EntityBudgetVersionViewModel>>(Request[
That populates those three collections and in my mapping I use them to add/change/remove the records in the entity.
The form validation works fine.
I would stick with this but there are some issues.
1. You can't add a row at the bottom without your own js hack.
2. If there is an error when the model is validated, since the grid uses AJAX binding (required for batch incell editing) any changes made in the grid are lost.
3. Some bugs in the grid wrt editontab and dirty indicator showing even on no change.
So, I have asked the KendoUI team if their grid can do this, and he sent me a sample but it takes alot of code as well. http://www.kendoui.com/account/support-tickets/view-ticket.aspx?threadid=502782
While it will work with the normal form submit stuff you have to wire up all the validation yourself.
At this point I think I am just going to write my own jQuery plug in that wraps a table element with indexed ids. This would also allow the model binder to properly deal with the collection data. If I go that way we will probably not go with the Telerik controls and I will look at one of the open source grids like slickgrid or jq grid for my readonly grids...although I do like the way the Telerike MVC grid works for that use case.