TreeGrid and custom xml

Hello,



Does the treegrid support loading of custom xml structures as described in

dhtmlx.com/docs/products/dhtmlxG … tloadtypes



or is that just for the grid?



If I am using “xmlA” when loading my xml into the treegrid, how do I specify custom images?



Thanks for your great support thus far.



Regards,

Francisco




Hello,


treegrid supports “xmlA” loading format.


But unfortunately this format allows to specify only cell values and therefore it isn’t possible to define cell images in this case.


 



Ok.  So, does the treegrid support loading of custom xml structures (other than xmlA or xmlB)?  I was not sure from your previous answer.



 



 



 


Hello,


there are only deault, xmlA and xmlB xml structures. Also it possible to redefine rows and row tag names:


mygrid.xml.top = "data"
mygrid.xml.row = “myrow”;
mygrid.load(“some.xml”);


Creating custom loading types is possible for treegrid, but it is rather complcated. Please, see information about that:


dhtmlx.com/dhxdocs/doku.php?id=d … s_creation


Please see dhtmlxgrid_data.js as an example (code of xmlA and xmlB types creation).







Thank you.  xmlB is very close to what I need.  The only issue is the cell level parser.  xmlB expects the cells to be children of the row.  In my case, their is a node between the row and the cells  i.e.:







I am assuming that I have no choice but to create a custom loading type to support the above xml structure.  Are there any other caveats with custom loading types?



 



Regards.


You can try to use default xml loading, but xml.row property should be redefined:


mygrid.xml.row = “row/metadata”;
mygrid.load(“some.xml”);





Sorry, xml in previous post was incorrect.  Here is the corrected version:



 



Actually I tried that already but could not get it to work…My xml is as follows:



<object id=“0”>



<metadata>



<objname/>



<startdate/>



</metadata>



<childlist>



<object id=“1.1”>



<metadata>



<objname/>



<startdate/>



</metadata>



<childlist/>



</object>



<object id=“1.2”>



<metadata>



<objname/>



<startdate/>



</metadata>



<childlist>



<object id=“1.2.1”>



<metadata>



<objname/>



<startdate/>



</metadata>



<childlist/>



</object>



<object id=“1.2.2”>



<metadata>



<objname/>



<startdate/>



</metadata>



<childlist/>



</object>



</childlist>



</object>



</childlist>



</object>



 



So, in my case



mygrid.xml.top = “object”;



mygrid.xml.row = “childlist/object”;



but the cell date is in “childlist/object/metadata/objname”;



 



I could not get that structure to work using either the default loader or xmlB.


Also,



If I am forced into a custom loader type do you have an easier to read version of how xmlB is defined?  dhtmlxgrid_data.js is difficult to read.



Thank you for your excellent support thus far.



 


Unfortunately there isn’t ready solution to customize tag.


Uncompressed libraries can be found in the sources folder: dhtmlxGrid/sources/ext/dhtmlxgrid_data.js