Search code examples
jquerykendo-uikendo-panelbar

Expand a Multi level Kendo Panelbar to one of its children


I have a multi-level Kendo Panelbar; I need to expand the panelbar all the way down to one of its child nodes;

this is the best I could come up with, but it's limited to the first level of the panel item:

var panelBar = $(pnlMonitorId).data("kendoPanelBar");
panelBar.select(panelBar.element.children("li").eq(0));

var item = panelBar.select();
panelBar.expand(item);

any ideas?

thanks


Solution

  • In case anyone is wondering, I consider the lack of support for the following a short coming:

    panelbar.expand("...some deep node to expand to...")
    

    anyways, I resolved the problem by:

    var panelBar = $("#myPanel").data("kendoPanelBar");
    
    //2 > 7 > 32
    panelBar.select($('[id="2"]'));
    var item = panelBar.select();
    panelBar.expand(item);
    
    panelBar.select($('[id="7"]'));
    item = panelBar.select();
    panelBar.expand(item);
    
    panelBar.select($('[id="32"]'));
    item = panelBar.select();
    panelBar.expand(item);