This is a migrated thread and some comments may be shown as answers.

Expand All?

4 Answers 528 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 15 Dec 2011, 09:52 PM
How can I expand all?

I thought I saw some code in this demo to do it, but firebug keeps returning "undefined"

var menucontainer = $("#menu");
 
menucontainer.insertBefore($("#content-wrapper")); //Move the menu
menucontainer.kendoPanelBar(); //Kendo the Menu
 
menucontainer.data("kendoPanelBar").expand($("#menu .k-link"), true);

4 Answers, 1 is accepted

Sort by
0
Accepted
Kamen Bundev
Telerik team
answered on 16 Dec 2011, 09:22 AM
Hi Steve,

The demo you mention is reinitializing the PanelBar completely every time different animation is chosen. About the expand all question - you should pass to PanelBar the items you want expanded, not the links in them (use the .k-item selector).

Greetings,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 19 Dec 2011, 03:08 PM
Hey Kamen,
  Thanks, k-item works :)

Could we perhaps put in a feature request to have the panelbar items initialized AS expanded instead of spending processing time popping it open after it's created?

Steve
0
Kamen Bundev
Telerik team
answered on 19 Dec 2011, 03:45 PM
Hello Steve,

You can add it as a feature request on the Kendo UI Feedback page and we will consider implementing it if more people request it.

Kind regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Masaab
Top achievements
Rank 1
answered on 09 Sep 2014, 04:39 AM
HTML
  <ul id="palettePanelBar">
<li id="item1" class="k-state-active">
<!--Some Data-->
</li>
<li id="item2">
<!--Some Data for second item-->
  
</li>
</ul>



Javascript

var panelBar = $("#palettePanelBar").data("kendoPanelBar");
panelBar.expand($('[id^="item"]'));
Tags
PanelBar
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Kamen Bundev
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Masaab
Top achievements
Rank 1
Share this question
or