0

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.

Brant Olsen
  • 5,628
  • 5
  • 36
  • 53
user2596356
  • 1
  • 1
  • 1

1 Answers1

2

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/

OnaBai
  • 40,767
  • 6
  • 96
  • 125
  • Did you add `expandMode: "multiple"` to you PanelBar definition? Please, check the link to an example added to the answer – OnaBai Jul 18 '13 at 18:11