Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by josephtan2k on Dec 11, 2007 19:35
open dhtmlx forum
loading xml with no content problem

hi..

i've been having this problem on loading..when i load( loadXML() ) xml's with content there is no problem, when i also load xml's with no content basically no cells and headers..it loads fine, loading virtually nothing..
the problem is if i load an xml with content and reload it(loadXML()) with an XML with no content the grid doesnt seem to react, instead leaves the grid with the previous XML(the one with content)..

tnx in advance..
Answer posted by Support on Dec 12, 2007 05:19
Actually this is expected behavior, by default, if you loading xml without configuration data ( //head/column ) - data will be added to existing grid , without resetting existent data.
If you need to be sure that previous data cleared , just add next section to your XML

   <rows>
       <head><afterInit><call command="clearAll" /></head></afterInit>
   ... any row data here , or nothing if not necessary ...
</rows>