Click here to Skip to main content
15,920,632 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have to design a hierarchical TreeView in ASP.Net. I Have tried the demo shown at Graphic JavaScript Tree with Layout[^].
It works fine for few levels but as the level increases it is not able to display the left hand side of the tree properly.

Please Help..I want the tree to display the root in the center of the Page..

My code for the Nodes of the Tree is :

XML
<html>
    <head>
<center>
        <title>ECOTree Simple Tree 3</title>
        <script type="text/javascript" src="ECOTree.js"></script>
        <link type="text/css" rel="stylesheet" href="ECOTree.css" />
        <xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
        <style>v\:*{ behavior:url(#default#VML);}</style>
        <style>
            .copy {
                font-family : "Verdana";
                font-size : 10px;
                color : #CCCCCC;
            }
        </style>

        <script>
            var myTree = null;
            function CreateTree() {
                myTree = new ECOTree('myTree', 'myTreeContainer');
                myTree.config.colorStyle = ECOTree.CS_LEVEL;
                myTree.config.nodeFill = ECOTree.NF_FLAT;
                myTree.config.useTarget = false;
                myTree.config.selectMode = ECOTree.SL_NONE;
                myTree.config.defaultNodeWidth = 65;
                myTree.config.defaultNodeHeight = 20;
                myTree.config.iSubtreeSeparation = 20;
                myTree.config.iSiblingSeparation = 15;
                myTree.config.iLevelSeparation = 30;
                myTree.add(0, -1, 'Node O');myTree.add(1,0,'NMCL000001');myTree.add(2,1,'NMCL000002');myTree.add(3,1,'NMCL000003');myTree.add(5,3,'NMCL000005');myTree.add(4,2,'NMCL000004');myTree.add(6,2,'NMCL000006');myTree.add(7,6,'NMCL000007');myTree.add(31,6,'NMCL000031');myTree.add(32,31,'NMCL000032');myTree.add(37,31,'NMCL000037');myTree.add(88,37,'NMCL000088');myTree.add(36,32,'NMCL000036');myTree.add(38,36,'NMCL000038');myTree.add(41,38,'NMCL000041');myTree.add(50,41,'NMCL000050');myTree.add(65,50,'NMCL000065');myTree.add(66,65,'NMCL000066');myTree.add(77,66,'NMCL000077');myTree.add(81,77,'NMCL000081');myTree.add(87,81,'NMCL000087');myTree.add(26,7,'NMCL000026');myTree.add(8,7,'NMCL000008');myTree.UpdateTree();}</script>
    </head>
    <body onload="CreateTree();">
        <h4>ECOTree Simple Tree 3. Walker's sample.&nbsp;<span class="copy">&copy;2006 Emilio Cortegoso Lobato</span></h4>
        <div id="myTreeContainer">
        </div>
    </body>
</html>


here is the link of the image preview http://imageshack.us/photo/my-images/52/treefs.jpg/[^]
Posted
Comments
Christian Graus 13-Feb-12 11:29am    
If you're using a control you found on the web, you should talk to the authors, we have no idea about that control, unless we happen to have used it.
Deepak.xip 14-Feb-12 8:41am    
I Have made another Tree view my Self and its working fine

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900