We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Accordion collapsed by default

Hi, I would like to have an accordion with only one panel, and the panel must be collapsed by default when view is loaded (take a look to the attach). How can I do it?

My ascx has the following code:

...
<%=Html.Syncfusion().Accordion("accordion-name")
.AutoFormat(Skins.Office2007Silver)
.HeaderIcon("search-icon")
.Animate(Effects.slide)
.AutoHeight(true)
.Collapsible(true)
%>

Thanks!



1 Reply

VI Vignesh Syncfusion Team June 23, 2011 11:13 AM UTC

Hi Sergio,

Thanks for using syncfusion products.

We suggest you to use the following code to achieve your requirement.


[Javascript]
Sys.Application.add_load(function () {
$('#accordion-name').accordion({
active: false
});
});



Also I have created a simple sample and attached in the below link,


TreeView467840173.zip

Please try this and let us know if this helps.

Regards,
Vignesh


Loader.
Live Chat Icon For mobile
Up arrow icon