Check documentation for the latest version of dhtmlxSuite clearAndLoad DHTMLX Docs

clearAndLoad

clears the existing grid state and loads data from an external file ( xml, json, jsarray, csv )

void clearAndLoad(string url, [function call,string type] );
urlstringurl to an external file
callfunctionafter loading callback function, optional
typestringtype of data (xml,csv,json,jsarray), optional, XML by default

Example

//clear grid and load new data
myGrid.clearAndLoad("grid_new.xml");
//clear grid, load new data, execute doAfterRefresh() function after grid was loaded
myGrid.clearAndLoad("grid_new.xml",doAfterRefresh);
//clear grid, load new data in csv format, execute doAfterRefresh() function after grid was loaded
myGrid.clearAndLoad("grid_new.csv",doAfterRefresh,csv);

Back to top