loads data from an external file ( xml, json, jsarray, csv )
url | string | url to an external file |
call | function | after loading callback function, optional, can be omitted |
type | string | type of data (xml,csv,json,jsarray), optional, xml by default |
promise | a "promise" object |
// load grid from an external file
myGrid.load("grid.xml");
// load grid, execute doAfterRefresh() function after grid was loaded
myGrid.load("grid.xml",doAfterRefresh);
// load grid from an external csv file,
// execute doAfterRefresh() function after grid was loaded
myGrid.load("grid.csv",doAfterRefresh,"csv");
// returns a "promise" object, see details
myGrid.load(url).then(function(text){
// text - a server side response
});
DHTMLX is integrated with Promiz.js library to treat the result of asynchronous operations (like data loading) without callbacks. Read more about integration of DHTMLX with Promiz.js.