There is no direct way to Expand/Collapse all panes in Accordion Extender. Using following java script, Accordion can be Expand/Collapse all panes in one click.
<script type="text/javascript">
function
pageLoad()
{
collapseAll();
}
function
collapseAll()
{
var
behavior = $get("<%=UserAccordion.ClientID%>").AccordionBehavior;
for
(var i = 0; i < behavior._panes.length; i++)
{
behavior.get_Pane(i).content.style.display = 'none';
behavior.get_Pane(i).content.height = 0;
behavior.get_Pane(i).content.style.height = '0px';
}
behavior.set_SelectedIndex(-1);
}
function
expandall()
{
var
behavior = $get("<%=UserAccordion.ClientID%>").AccordionBehavior;
for
(var i = 0; i < behavior._panes.length; i++)
{
behavior.get_Pane(i).content.style.display
= 'block';
behavior.get_Pane(i).content.height =
behavior.get_Pane(i).content.scrollHeight;
behavior.get_Pane(i).content.style.height =
behavior.get_Pane(i).content.scrollHeight + 'px';
}
}
</script>