jQuery UI Widgets Forums Navigation Tree Join Two jqxTree

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 8 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Join Two jqxTree #84250

    SumitRoy
    Participant

    Dear JQXWidget Team,

    I have two jqxTree objects and they are created from HTML as follows

    Tree 1

    <div id='jqxTree1' style='visibility: hidden; float: left; margin-left: 20px;'>
                    <ul>
                        <li>Root</li>
                    </ul>
    </div>

    and I created the tree as $('#jqxTree1').jqxTree({ height: '450px', width: '300px'});
    and Tree 2

    <div id='jqxTree2' style='visibility: hidden; float: left; margin-left: 20px;'>
                    <ul>
                        <li>Child1</li>
                        <li>Child2</li>
                        <li>Child3</li>
                    </ul>
    </div>

    and I created the tree as $('#jqxTree2').jqxTree({ height: '450px', width: '300px'});

    Now if I want to append Tree 2 into Tree 1 how I can do that using javascript only ? I need to do this programmatically and hence I cannot do it in HTML. Please note I have to create both of the tree from HTML code and join them using javascript.

    please help me..
    thanks and regards
    Sumit Roy

    Join Two jqxTree #84284

    Hristo
    Participant

    Hello SumitRoy,

    Maybe I do not understand you correct. But this scenario is strange. (You could get html elements from Tree2 and append to suitable place in Tree1)
    Please, take a look at this demo:
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/dragdrop.htm?arctic
    Unfortunately is not possible to append directly one Tree to another.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Join Two jqxTree #84287

    SumitRoy
    Participant

    Dear JQX,
    What I want to say is I have both the trees Tree 1 and Tree 2 and both are invisible when they are initialized at page load.
    Now what I want is to call some javascript code that will merge the trees and create the following tree structure

    <div id='jqxTree1' style='visibility: hidden; float: left; margin-left: 20px;'>
    	<ul>
    		<li>Root
    		  <ul>
    			 <li>Child1</li>
    			 <li>Child2</li>
    			 <li>Child3</li>
    		  </ul>
    		</li>
    	</ul>
    </div>
    Join Two jqxTree #84330

    Hristo
    Participant

    Hello SumitRoy,

    Please, take a look at this example:
    http://jsfiddle.net/txhi/sk1rwz0g/

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.