KendoUI PanelBar Expand is not working

4.5k views Asked by At

I want to expand all kendoui panelbars on singleclick of button. i have used a class for initialization of panelbars and i have used the following logic for the same. please help me as soon as possible.

var ptemp = $("#paneltemp").kendoPanelBar().data("KendoPanelBar");

$("#expandbutton").click(function () {

    alert("Hello");
    var item = $("#paneltemp .t-item:eq(0)");
    ptemp.expand(item).activate(item);

});

please help me as soon as possible.

1

There are 1 answers

1
OnaBai On

You should do:

var ptemp = $("#paneltemp").kendoPanelBar().data("KendoPanelBar");

$("#expandbutton").click(function () {
    alert("Hello");
    ptemp.expand($("li", ptemp.element));
});

Running example here: http://jsfiddle.net/OnaBai/P6ef6/