Hello! I have a problem with binding MVVM objects to action parameters.
When I have on client side in viewmodel array of observable objects (for example (pseudocode) array TestArray: 0 {Id: 3, Name: 'qwe', State: 2}, 1 {Id: 5, Name: 'rty', State: 3}) and I post this from popup window (grid editing), on server side I get such form values: TestArray[0][Id], TestArray[0][Name], TestArray[0][State], TestArray[1][Id], TestArray[1][Name], TestArray[1][State]
But I expect to get: TestArray[0].Id, TestArray[0].Name etc., becouse I want MVC to bind this data to IEnumerable of custom type (public int Id, public string Name, public int State).
Can you give me advise how to solve this problem, thank tou
When I have on client side in viewmodel array of observable objects (for example (pseudocode) array TestArray: 0 {Id: 3, Name: 'qwe', State: 2}, 1 {Id: 5, Name: 'rty', State: 3}) and I post this from popup window (grid editing), on server side I get such form values: TestArray[0][Id], TestArray[0][Name], TestArray[0][State], TestArray[1][Id], TestArray[1][Name], TestArray[1][State]
But I expect to get: TestArray[0].Id, TestArray[0].Name etc., becouse I want MVC to bind this data to IEnumerable of custom type (public int Id, public string Name, public int State).
Can you give me advise how to solve this problem, thank tou