Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

Closing all panes in an AJAX Accordion

4.17/5 (6 votes)
8 Sep 2011CPOL 33.3K  
How to close all panes in an AJAX Accordion.

Recently I faced a problem in making all panes of the Accordion control close by default, and I spent many hours searching until I discovered a solution by myself. And here is what we should do:


In the Accordion control, set requireopenedpane to false and selectedindex="-1".


It will work like magic. Good luck.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)