DHTMLX Docs & Samples Explorer

Index
dhtmlxgrid
API Methods

### clearAndLoad(url, call, type)

Required library edition:
Required library file: dhtmlxgrid.js

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

- url - url to external file
- call - after loading callback function, optional, can be ommited
- type - type of data (xml,csv,json,jsarray) , optional, xml by default

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

See also: clearAll, clearChangedState, clearConfigCookie, clearSelection, load