Grid - sub grid is not working


I’m trying to insert a sub grid, but I get the following error:

Error type: LoadXML
Description: Incorrect XML.

from Mozila:

and in IE:

Here is the xml which I use, look at the last cell which has the sub_row_grid type:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><rows><row id="1"><cell type="ro"> òîåãä1</cell><cell type="ro">òîåãä 10</cell></row><row id="9"><cell type="ro"> òîåãä9</cell><cell type="sub_row_grid">step1.xml</cell></row></rows>

Do you have any idea what’s the problem with the xml? Why it is not valid?!

Thanks, Efrat

Be sure that special chars in your xml is really utf8 and not iso-8859-1 or in some other encoding.
Incorrect encoding value can cause such problem.

No, I changed it to the following xml and it’s still not working:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><rows><row id="1"><cell type="ro">1</cell><cell type="ro">10</cell></row><row id="9"><cell type="ro">9</cell><cell type="sub_row_grid">step1.xml</cell></row></rows>

Any other ideas?!

Thanks, Efrat

Unfortunately issue can’t be reconstructed locally.
If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.

What do you mean not reconstructed??

Can’t you take that xml and use it for a sub grid? I don’t find what my problem is and I don’t manage to have sub grid on my application.

Any other help you can provide? an example of a real demo with a sub grid?

Thanks, Efrat

Your xml is well. Please provide sample of initialization of your grid and subgrid.

Also you can find working demo here:


I’ve tried to create the simplest grid with no extra fetuers.

Here are the whole html and xmls I’m using and I get the same error as in my application (this.obj.firstChild is null):



DHTMLX Package


<?xml version="1.0" encoding="UTF-8"?> <rows> <row id="a"> <cell>Model 1</cell> <cell>100</cell> <cell>399</cell> </row> <row id="b"> <cell>Model 2</cell> <cell>50</cell> <cell>649</cell> </row> <row id="c"> <cell>MOdel 3</cell> <cell>70</cell> <cell type="sub_row_grid">rows2.xml</cell> </row> </rows>

And sub xml:

<?xml version="1.0" encoding="UTF-8"?> <rows> <row id="a1"> <cell>Model 1</cell> <cell>100</cell> <cell>399</cell> </row> <row id="b1"> <cell>Model 2</cell> <cell>50</cell> <cell>649</cell> </row> <row id="c1"> <cell>MOdel 3</cell> <cell>70</cell> <cell>499</cell> </row> </rows>

Could you please try to reproduce and tell me what my problem is?

Thanks ,Efrat

You didn’t initialized the sub grid.
In the working example from my previous post you can see that sub grid is initialized from xml.

Also aas you can sse in the same example if you add the sub grid into the firct cell of a row in that cell you will see the “+” sign. The sub grid will be shown in the next (second) cell of a row.
In your xml you add the sub grid into the last cell of a row. So there is no place for a subgrid.

What do you mean by

?? Where is it being initialized?? in the xml I see only the type “sub_row_grid” and I don’t see what is initialized.

Thanks, Efrat

How to load static data row in subgrid ?
exp : myGrid.load("…/common/sgrid.xml" );
i want myGrid.load("…/common/sgrid.html") or any id can pass

Could you please clarify your question.
You may use the onSubgridCreated event:
to control and configure your subgrid creation.
Also you may use the “sub_row_ajax” column type allowing to place the html-page as the subrow of your grid.