loads data from an external file (xml, json, jsarray, csv)
url | string | an URL an the external file |
type | string | optional, type of data (xml,csv,json,jsarray), xml by default |
callback | function | optional, after loading callback function, can be omitted |
promise | a "promise" object |
// load dataview from an external file
myDataView.load("dataview.xml");
// load dataview, execute doAfterRefresh() function after dataview was loaded
myDataView.load("dataview.xml", doAfterRefresh);
// load dataview from an external csv file,
// execute doAfterRefresh() function after dataview was loaded
myDataView.load("dataview.csv","csv", doAfterRefresh,);
// returns a "promise" object, see details
myDataView.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 Promix.js.