Check documentation for the latest version of dhtmlxSuite load DHTMLX Docs

load

loads data from an external file ( xml, json, jsarray, csv )

promise load(string url,function call,string type);
urlstringurl to an external file
callfunctionafter loading callback function, optional, can be omitted
typestringtype of data (xml,csv,json,jsarray), optional, xml by default
promisea "promise" object

Example

// 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
});

Details

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.

Change log
  • integration with Promiz.js is added in version 5.1
Back to top