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 the external file
myTreeGrid.load("grid.xml");
//load grid, execute doAfterRefresh() function after grid was loaded
myTreeGrid.load("grid.xml",doAfterRefresh);
//load grid from the external csv file, 
//execute doAfterRefresh() function after grid was loaded
myTreeGrid.load("grid.csv",doAfterRefresh,"csv");
// returns a "promise" object, see details
myTreeGrid.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