Datatable new row id

I’m adding new row to datatable with add method and datatable has save property to save it backend.

Backend returns new row id but datatable doesn’t show the right id unless I click added row.

Set updateFromResponse flag to force row repainting after data saving.

http://docs.webix.com/api__dataprocessor_updatefromresponse_config.html

It will update data item with properties from response, you can use to update not only id but some other properties as well.

Now firstly it shows automatically created id and then fetches my returned id.

Can we force for show row after response?

Also sometimes I throw exceptions from my php file. Can I handle them?

Also sometimes I throw exceptions from my php file.

You can use onLoadError event of dataprocessor

It will fire for invalid response or response with error status code

If you are using updateFromResponse, please be sure that JSON response is something like next

{ id: "newid" }

Can I use it in webix.DataCollection

I’ve tried but It’s not catching errors when update.

onValidationError works fine but it works for only rules.

onLoadError works for all data components, including DataCollection

http://docs.webix.com/api__link__datacollection_onloaderror_event.html

It will fire when server side returns an error code during data saving. Not exactly the same scenario as in case of the onValidationError event.