Been looking hard for answers to this but haven't been successful. These are the conditions:
- MVC 4
- Kendo MVC 2013,1,319,340
- Grid using Ajax Binding
- Using Web Api
I'm binding the grid to a model with a structure that looks something like this:
Organization
- Id
- Name
- Address
---- Id
---- Street
---- Zip
---- City
Most works fine (Creating (POST), Deleting (DELETE), Get (get)). However, when trying to update (PUT), the Address is not properly bound in the controller. I've attached a screenshot from fiddler showing the request body. Looks kinda weird to me.
I've also attached two screens showing the invalid ModelState and the error.
So, my question is if it's possible to properly bind the whole object (Organization) including the Address? I quess my model could be flattened but if possible I'd like to avoid that to keep it cleaner.
Organization
- Id
- Name
- Address
---- Id
---- Street
---- Zip
---- City
Most works fine (Creating (POST), Deleting (DELETE), Get (get)). However, when trying to update (PUT), the Address is not properly bound in the controller. I've attached a screenshot from fiddler showing the request body. Looks kinda weird to me.
I've also attached two screens showing the invalid ModelState and the error.
So, my question is if it's possible to properly bind the whole object (Organization) including the Address? I quess my model could be flattened but if possible I'd like to avoid that to keep it cleaner.