I am working on an app where i am adding panelbars (multiselection) using JSP Wrapper (which means no ID to each of the panels), and inside those have the grids.
The grids are storing data specific to the selected person, who are displayed as list items(images) on the top of the page.
What I want to do is that when user changes the selection of person, from the current selected to another, collapse all the panels of the kendo panelbar. This would help in reloading the data of the new person, because when the user will select/expand the panel to see the data, i would catch the event and reload the grid with a new Datasource, based on the selected person.
I hope I make sense here, but I am not sure how to collapse all the panels of the PanelBar.
Any Suggestions??
HTML
Javascript
If the
id
of yourPanelBar
ispanel
, do:or
i.e. we will
collapse
everyli
element under#panelbar
.EDIT: If you want to remove the selection, add:
You can use this block to collapse all panel and as a bonus to the answer, you can expand only the selected after that in this way: