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
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:
var panelBar = $("#importCvPanelbar").data("kendoPanelBar");
panelBar.collapse($("li"));// will collapse all panel item
panelBar.bind("select", function(e) {
var itemId = $(e.item)[0].id;
panelBar.expand(itemId);// will expand the selected one
});