Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Gyle on Feb 27, 2009 13:43
open dhtmlx forum
using dhtmlxtreegrid load XML with expand attribute

I am using XML to load heirarchy and specific rows need to be expanded. I have tried the following XML format, without success.

<?xml version="1.0" encoding="utf-8" ?>
<rows parent="0">
<row id="1" expand="1">
<cell>Folders</cell>
<row id="2">
<cell>windev.domain.com</cell>
<cell>22</cell>
<row id="21">
<cell>Domain Controllers</cell>
<cell>1</cell>
</row>
<row id="22">
<cell>Computers</cell>
<cell>1</cell>
</row>
<row id="23">
<cell>Development</cell>
<cell>20</cell>
<row id="24">
<cell>Broker</cell>
<cell>10</cell>
</row>
<row id="25">
<cell>Keeper</cell>
<cell>10</cell>
</row>
</row>
</row>
</row>
</rows>

How do I specify in the XML stream that a given row should be expanded?

Thanks in advance.
Gyle
Answer posted by Support on Mar 02, 2009 06:55
Please try to replace it with
           <row id="1" open="1"> 
Answer posted by Gyle on Mar 02, 2009 08:35

Thanks, Alex.

That fixed the issue. Is there some place where I can find this documented?

Best regards,

Gyle

Answer posted by Alex (support) on Mar 02, 2009 09:28

The detailed xml format for all dhtmlx components can be found at the following page

http://www.dhtmlx.com/docs/products/docsExplorer/doc/dhtmlxxml/index.html

Answer posted by Gyle on Mar 02, 2009 09:47

Hello, Alex.

Referring to the doc link you provided...

row tag represent row of grid, one tag for each row
supports all attribute of normal grid + two additional

Attributes

expand branch will be expanded on load, attribute need to be skipped if you want to have closed branch

 

 

xmlkids

used in dynamical loading mode only,

 


attribute states that there are some sub-rows exists, but they not loaded yet,
component will send additional request on item opening, to fetch additional data

There is no reference to open.

 

Answer posted by Alex (support) on Mar 03, 2009 01:27

Hello, Gyle.

Yes, there is a mistake in the documentation.

Sorry for the misleading information.

We will necessary change this page at our website. 

Answer posted by Gyle on Mar 03, 2009 08:51

Hello, Alex.

Your company should consider ways for your customers to contribute to correcting errors in the product documentation. A Wiki or blog per page would probably do the trick.

Best regards,

Gyle

Answer posted by Alex (support) on Mar 04, 2009 08:18

Hello, 

Thank you for suggestion.

It sounds like a very good idea. It is possible that we will create something similar.