A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/data_collection/api/datacollection_save_method/ below:

JavaScript DataCollection - save Method

grid.data.save("http://userurl/");


grid.data.save(new DataProxy({url:"http://userurl/"}));

Each time the user changes data of the component, the save() method will make an AJAX call and expect the remote URL to save data changes. The method will send one of the following requests to the backend:

Data saving is asynchronous, so you need to return a promise - the result of the saving operation. To do this, use the saveData property that returns a "promise" object:

const data = new DataCollection();
data.save(loader);
return data.saveData.then(function () {

});

Use the isSaved method to know whether the changes are saved:

grid.data.saveData.then(function () {
console.log(grid.data.isSaved());
});
Change log:

Before v7.2, the method sent the POST request to the backend on each change of data.
Starting from v7.2, depending on the user actions (editing, adding, or deleting of data), the method sends different requests (POST, PUT, or DELETE respectively) to the server.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4