Layout attach on 2 cells

Dear All,



i have succed attach tree in cell a (using 2U layout) now i want to attach to cell b an accordion, i have try several way to make it, but always fail. here is my code :



Thanks for your help

regards













    CCBDG Application Suit

    

    

    

    

        

    



    

    

        

    

    

    

    

    

    

    

        

    

    







    

    



    

    

            html, body {

            width: 100%;

            height: 100%;

            margin: 0px;

            padding: 0px;

            overflow: hidden;

        }

    







    var dhxLayout;

        dhxTree;

        dhxTabbar;

        dhxText;

        dhxAccord;

        

    function doOnLoad()

    {

    dhxTabbar=new dhtmlXTabBar(“parentId”,“top”);

dhxTabbar.setSkin(‘dhx_skyblue’);

dhxTabbar.setImagePath("./dhtmlxTabbar/codebase/imgs/");

    

    dhxTabbar.addTab(“a1”,“Service Control”,“150px”);

    dhxTabbar.setTabActive(“a1”);

    dhxTree = dhxTabbar.cells(“a1”).attachLayout(“2U”).cells(“a”).attachTree();

    dhxTree.setImagePath("./dhtmlxTree/codebase/imgs/csh_vista/");

dhxTree.loadXML("./dhtmlxTree/samples/common/tree.xml?etc=" + new Date().getTime());

    

    dhxTabbar.addTab(“a2”,“Service Support”,“150px”);

    dhxTabbar.setTabActive(“a2”);

    dhxTree = dhxTabbar.cells(“a2”).attachLayout(“2U”).cells(“a”).attachTree();

dhxTree.setImagePath("./dhtmlxTree/codebase/imgs/csh_vista/");

dhxTree.loadXML("./dhtmlxTree/samples/common/tree.xml?etc=" + new Date().getTime());

    

    dhxTabbar.addTab(“a3”,“Service Operation”,“150px”);

    dhxTabbar.setTabActive(“a3”);

    dhxTree = dhxTabbar.cells(“a3”).attachLayout(“2U”).cells(“a”).attachTree();

dhxTree.setImagePath("./dhtmlxTree/codebase/imgs/csh_vista/");

dhxTree.loadXML("./dhtmlxTree/samples/common/tree.xml?etc=" + new Date().getTime());

    

    dhxTabbar.addTab(“a4”,“Complain Handling”,“150px”);

    dhxTabbar.setTabActive(“a4”);

    dhxTree = dhxTabbar.cells(“a4”).attachLayout(“2U”).cells(“a”).attachTree();

dhxTree.setImagePath("./dhtmlxTree/codebase/imgs/csh_vista/");

dhxTree.loadXML("./dhtmlxTree/samples/common/tree.xml?etc=" + new Date().getTime());

    

    

    }

Hello.

here is the possible method:

var layout = dhxTabbar.cells(“a4”).attachLayout(“2U”);

var dhxTree = layout.cells(“a”).attachTree();
dhxTree.setImagePath("./dhtmlxTree/codebase/imgs/csh_vista/");
dhxTree.loadXML("./dhtmlxTree/samples/common/tree.xml?etc=" + new Date().getTime());

var accordion = layout.cells(“b”).attachAccordion();


Dear Alex,



I try like this, but still cannot run, which part i’m wrong ?



 



 dhxTabbar.addTab(“a4”,“Complain Handling”,“150px”);
 dhxTabbar.setTabActive(“a4”);
 //dhxTree = dhxTabbar.cells(“a4”).attachLayout(“2U”).cells(“a”).attachTree();
    //dhxTree.setImagePath("./dhtmlxTree/codebase/imgs/csh_vista/");
    //dhxTree.loadXML("./dhtmlxTree/samples/common/tree.xml?etc=" + new Date().getTime());
 
 
 var layout = dhxTabbar.cells(“a4”).attachLayout(“2U”);
 var dhxTree = layout.cells(“a”).attachTree();
 dhxTree.setImagePath("./dhtmlxTree/codebase/imgs/csh_vista/");
 dhxTree.loadXML("./dhtmlxTree/samples/common/tree.xml?etc=" + new Date().getTime());
 var accordion = layout.cells(“b”).attachAccordion();
 accordion.addItem(“b”,“item a”);
 
 }

Please have a look at the attached sample. Possibly it’ll help to resolved the issue

sample.zip (111 KB)


Ok alex, it’s very helpful



Thanks a lot,



BR,



Bernard