Click here to Skip to main content
15,886,100 members
Articles / Web Development / ASP.NET
Tip/Trick

Closing all panes in an AJAX Accordion

Rate me:
Please Sign up or sign in to vote.
4.17/5 (6 votes)
8 Sep 2011CPOL 31.8K   1   7
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)


Written By
Software Developer Netiks
Lebanon Lebanon
I have been a programmer for about one year.My power is in asp.net and flash (actionscript 3).I also work on windows application using vb.net and c#.

Comments and Discussions

 
GeneralMy vote of 1 Pin
Member 1099308324-Sep-14 6:50
Member 1099308324-Sep-14 6:50 
Questionnot working Pin
irfanansari23-Apr-14 9:12
irfanansari23-Apr-14 9:12 
Generalthank u Pin
Mohammad Aboush1-Oct-13 13:12
Mohammad Aboush1-Oct-13 13:12 
QuestionYes......... Pin
rhubka14-Mar-13 9:50
professionalrhubka14-Mar-13 9:50 
GeneralReason for my vote of 5 sdf Pin
nilaypatel929-Jan-12 18:37
nilaypatel929-Jan-12 18:37 
Generaldfgdgfdg Pin
Kaialsh Chandra Behera10-Nov-11 2:06
Kaialsh Chandra Behera10-Nov-11 2:06 
Generalgfdg Pin
Kaialsh Chandra Behera10-Nov-11 2:06
Kaialsh Chandra Behera10-Nov-11 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.