Hi,
Is there a way to have a complex TreeGrid as specified in the attached file (complexTreeGrid.jpg)? Parents and childs have more one row.
Thanks for your help.
Hello,
in this situation you may use a colspan in your header (#cspan).
Read the following tutorial
docs.dhtmlx.com/doku.php?id=dhtm … _in_header
Hi,
The issue is not for the header by for rows (Parent 1, …) and its childs (Child 1.1…). The first column is of tree type and it contains one value which is associated to two rows (for all items). So, “Parent 1” has 2 rows and all its childs have 2 rows. To resume, for each cell in the 1st column (tree) we have 2 values for other columns.
Thanks.
hi again,
to implement that try to use rowSpan method
http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:cells_manipulation#merging_cells
Hi,
I have already implemented rowspan like following :
Parent1
Commandes
Ventes
Child1.1
Commandes
Ventes
The problem is for the second level. I want to set childs for “p1” after “Ventes” cell but the 1st cell of “p1_m” is empty and the tree image is in “p1” row. So, it’s not possible to expand “p1_m” ?
Is it possible to use rowspan by setting the 1st cell of “p1” as empty and the 1st cell of “p1_m” with value?
Thanks.
Hello,
you can have only one tree cell in the row, but it can be on any position you like.
Also couldn’t you please provide a screenshot with tree structure you want to implement including plus\minus images and merged cells. It’s hard to detect it from the attached one
Hi,
And when I expand an item I want to have “-” image instead of “+”.
Unfortunately it impossible to merge cells in treeGrid in such way.
Hi,
I found a solution to merge cells like following (as example):
<row id="<s:property value="%{key}"/>_m">
<s:property value="%{key}"/>
Ventes
<s:iterator value=“listVentes”>
<s:property />
</s:iterator>
<row id="<s:property value="%{key}"/>" xmlkids=“1”>
Commandes
<s:iterator value=“listCommandes”>
<s:property />
</s:iterator>
And I use onRowSelect event to expand and collapse items with xmlkids = 1. So, when I click on a row “id_m” I expand the row “id”. Also, I set manually images corresponding to expand and collapse.