I have implemented a feature similarly to http://demos.telerik.com/kendo-ui/listview/mvvm except:
1) the create transport is implemented;
2) all transports are functions calling $.ajax with specific options.
The server validates data and I could certainly match validation rules on the client, but I am not there yet.
At this stage, a creation or an update made with invalid data triggers a 400 - Bad Request response from the server.
The issue I have, is the error as no effect on the listView:
- the creation is validated with invalid data (it looks this way)
- the update is also validated with invalid data (it also looks this way).
When I would have expected the listView to remain in edit mode with a validation error message (like with client validation).
Is this normal behavior and is it up to the programmer to define the consequences of an error?
To achieve this, I have bound the error event of the dataSource to an event handler and I get the xhr, the status and the errorThrown. Unfortunately the event handler does not tell me which transport went wrong (creation, update) and which item is affected. Is there any way to obtain these informations to restore the listView in edit mode and display a validation error message?
1) the create transport is implemented;
2) all transports are functions calling $.ajax with specific options.
The server validates data and I could certainly match validation rules on the client, but I am not there yet.
At this stage, a creation or an update made with invalid data triggers a 400 - Bad Request response from the server.
The issue I have, is the error as no effect on the listView:
- the creation is validated with invalid data (it looks this way)
- the update is also validated with invalid data (it also looks this way).
When I would have expected the listView to remain in edit mode with a validation error message (like with client validation).
Is this normal behavior and is it up to the programmer to define the consequences of an error?
To achieve this, I have bound the error event of the dataSource to an event handler and I get the xhr, the status and the errorThrown. Unfortunately the event handler does not tell me which transport went wrong (creation, update) and which item is affected. Is there any way to obtain these informations to restore the listView in edit mode and display a validation error message?