height bug

Hello,

I’ve the following tree :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body>
<div id="treetable"></div>
<script type="text/javascript" src="../../dhtmlx30/dhtmlxTree/codebase/dhtmlxcommon.js"></script>
<script type="text/javascript" src="../../dhtmlx30/dhtmlxTree/codebase/dhtmlxtree.js"></script>
<script type="text/javascript" charset="utf-8">
	tree=new dhtmlXTreeObject("treetable","100%","100%",0);
	tree.setImagePath("../../dhtmlx30/dhtmlxTree/codebase/imgs/");
    	tree.loadXML("treetable.xml");       
</script>
</body>
</html>

and the following XML :

<?xml version="1.0" encoding="iso-8859-1"?>
<tree id="0">
        <item id="1" text="&lt;table border=1&gt;&lt;tr&gt;&lt;td&gt;34&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;">        </item>
        <item id="2" text="&lt;table border=1&gt;&lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;">
                <item id="3" text="&lt;table border=1&gt;&lt;tr&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;">                </item>
        </item>
        <item id="4" text="&lt;table border=1&gt;&lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;">        </item>
        <item id="5" text="&lt;table border=1&gt;&lt;tr&gt;&lt;td&gt;33&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;">        </item>
</tree>

The problem is the tree is rendered with a big height between each row

How can I solve this problem ?

Thanks for your answer :slight_smile:

This issue occurs because of you are using table as items value. It’s strongly not recommended to insert html tables as tree items value.

Hello,

I understand that, but HTML tables are, I think, the only way to have multiple values correctly aligned on each row with a non fixed font (I create GPL product and I can’t use treegrid).

I have to found a solution for this problem (height bug), is there a way to correct this issue or do you have an another solution for align multiple values on a single row ?

Thanks in advance :slight_smile:

JC

You can align multiple values on a single row using other HTML tags