DataProxy is a helper that enables communication with external datasources. Using the helper allows creating a custom URL and assigning it to a variable that considerably simplifies work with server-side backend.
var proxy = new dhx.DataProxy("someUrl", {
// config options
})
The dhx.DataProxy helper takes two parameters:
For example, you can apply it either to DataCollection:
var dataCollection = new dhx.DataCollection();
var proxy = new dhx.DataProxy("https://myCustomUrl.com");
dataCollection.load(proxy);
or to any component of the dhtmlxSuite library that operate with data:
var grid = new dhx.Grid(...);
var proxy = new dhx.DataProxy("https://myCustomUrl.com");
grid.data.load(proxy);
The list of the available methods of dhx.DataProxy is described below.
load | loads data from an external URL |
save | sends an AJAX request to the server |
updateUrl | updates the initial URL and parameters that were specified when initializing proxy |