Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Paulo Antunes on Jan 10, 2008 06:31
open dhtmlx forum
Grid with subgrid

Hi all,

I already checked your very good example of a Grid with a Subgrid, and it works perfectly like we can see below:

<row id="2">
<cell type="sub_row_grid">sub.xml</cell>
<cell >Sub grid 1</cell>
...
</row>


But I would like to know if it's possible to insert directly XML instead of the XML filename between the <cell> tag. I've been trying and I already checked the knowledge base for some subject related with my doubt, without any success.

Could you please help me with this?

Thanks in advance,
Paulo
Answer posted by Support on Jan 10, 2008 07:42
Current version doesn't support such feature, but it can be modified without serious changes

dhtmlxgrid_excell_sub_row.js, line 159
    td._sub_grid.loadXML(c,function(){
can be replaced with
    td._sub_grid.loadXMLString(c,function(){

now you can specify in XML

<row id="2">
<cell type="sub_row_grid"><![CDATA[
    <grid>
       ... any grid xml here ...
    </grid>
]]></cell>
<cell >Sub grid 1</cell>
...
</row>
Answer posted on Jan 10, 2008 07:44
Just perfect =)

Thanks a lot
Answer posted by Paulo Antunes on Jan 10, 2008 08:48
Hi again,

I've been trying....

But is not working...I've already changed the js file with refresh in the browser I put the tags exactly how you said but I get the error "Error type: LoadXML Description: Incorrect XML"

Could you please help me with that?

Thanks a lot

Paulo
Answer posted by Support on Jan 10, 2008 09:12
Please check attached sample.
Attachments (1)
Answer posted by Paulo on Jan 11, 2008 01:43
Thanks a lot for answering me and to send me the example that is working.

But could you please change your example so instead of loading from a xml file could you load from a XML string.

Somehow I can't do it .


Thanks a lot in advance,

Paulo
Answer posted by Paulo on Jan 11, 2008 01:44
Sorry, it works now!
=)

Thanks