save
marks a data record as changed and initiates data saving
promise save(id id, [string operation,object obj] );
id | id | item id |
operation | string | "update" (default), "insert", "delete", "move" or null |
obj | object | the data object that is sent to the server |
promise | a promise of server-side processing for the result operation |
Example
// first save data
webix.dp($$("grid")).save(
webix.uid(),
"insert",
{ user:"Jack Thorn", level:80 }
).then(function(obj){
// then insert into the UI component
webix.dp($$("grid")).ignore(function(){
$$("grid").add(obj);
});
}, function(){
webix.message("Data was not saved");
});
Related samples
See also
Back to top