Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by GC on Oct 25, 2007 13:53
open dhtmlx forum
Can the kidsXmlFile be a xml String instead of a xml file or url?

Can the kidsXmlFile be a xml String instead of a xml file or url... like loadXMLString()?

i.e.
mygrid = new dhtmlXGridObject('gridbox');
...
var xml = "<rows>...</rows>";
mygrid.kidsXmlFile=xml;

as I need to reformat the xml coming from a source to the dhtmlx scheme, any way to achieve it?
Answer posted on Oct 26, 2007 01:49
Not possible by existing API, but pretty easy to achieva similar functionality by small modifications in source code

In dthmlxtreegrid.js you can locate next string

    this.loadXML(this.kidsXmlFile+""+s+"id="+r.id);

and replace it with any required loading data operation, for example with

    this.loadXMLString(this.kidsXmlFile);