chris
1
I have a DataTable. Data comes from Server / Database via PHP.
After changing any field in Table the current record/row is stored via PHP in Database.
Now I would like to reload this Row after Save, because Database-Trigger may have changed other fields.
- is that possible? How? Can the Ajax Call (save-Option of Datatable) simply return data that will be (re)loaded???
maksim
2
Yes, you can use
webix.db( $$(“grid_id”) ).config.autoupdate = true;
After such command, webix will expect that all data saving operations will return a json object, that will be used to update the original one
So the response will be like
{
id:"id",
value:"some text"
}
and “value” property of saved object will be updated to “some text”
maksim
3
In above snippet the id is optional as well, you can return not full model but only object with fields that need to be updated.
chris
4
Thank you for that hint.
Didn’t work, but found out it works with:
webix.dp( $$(“grid_id”) ).config.updateFromResponse = true;