save

marks a data record as changed and initiates data saving

promise save(id id, [string operation,object obj] );
id
iditem id operation
string"update" (default), "insert", "delete", "move" or null obj
objectthe data object that is sent to the server
promisea 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
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.