DHTMLX Docs & Samples Explorer

load (url, type, callback)

Required library edition: This method works with any edition of DHTMLX library

Required library file: dhtmlxdataview.js

Loads data from remote url

  • url - the data url, need to be in the same domain
  • type - the type of data
    • “xml”
    • “html”
    • “json”
    • “jsarray”
    • “csv”
  • callback - the callback function
	view.load("data.xml");
	view.load("data.xml",function(){
		//callback
	});
	//or
	view.load("data.xml","xml");
	view.load("data.json","json");
	//or 
	view.load("data.xml","xml",function(){
		//callback
	});
  • Callback is always the last parameter.
  • Methos is async., so you need to use callback to catch the moment when data is really loaded in the view.