Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Sergey on Mar 11, 2009 21:56
open dhtmlx forum
Promlems with loading XML file

Hello. My question is about how to load XML file using structure like this?
mygrid.init();
mygrid.loadXML("../LoadXMLFile.ashx?Path=myxml.xml");

This XML is in System Temp Directory. We can't generate XML file into project directory because there is problem with FCN (File Change Notifications). Here is a link to the problem http://support.microsoft.com/kb/911272

So we need to generate XML files for dhtmlxGrid to the System Temp and load it using some service.
There is no problem to load grid in the first time, but when I click on plus image (Expand command) I get an error that "Error loading XML. XML is incorrect".

How to fix this problem? How should I change the loading of XML file?
Answer posted by dhxSupport on Mar 12, 2009 02:42

>>There is no problem to load grid in the first time, but when I click on plus image (Expand command) I get an error that "Error loading XML. XML is incorrect".

If you want to load subgrid by clicking on plus image you can use "onSubGridCreated" event which can be used to customize sub-grid loading:

grid.attachEvent("onSubGridCreated",function(sub,id,ind,value){
  //sub - subgrid object
  //value - value from XML for related cell
  sub.loadXML(necessary path to the file)
  return false; //block default logic
});