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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Strange behaviour

Thread ID:





119256 May 28,2015 12:47 PM UTC May 29,2015 03:18 PM UTC ASP.NET MVC 1
Tags: Accordion
Asked On May 28, 2015 12:47 PM UTC

When using the accordion and setting it to .EnableMultipleOpen() and then enabling an already enabled item causes that item to close and then open again when clicking on it once.
This can be replicated by using the sample: http://mvc.syncfusion.com/demos/web/accordion/methods   
and then just adding the EnableMultipleOpen option.

Ragunath M [Syncfusion]
Replied On May 29, 2015 03:18 PM UTC

Hi Thomas 
Thanks for using Syncfusion products 
Query: enabling an already enabled item causes that item to close and then open again when clicking on it once in Accordion 
This is default behavior of our accordion controls. When we enable multiple open property then click the unexpanded item it will opens the clicked item without hiding previously opened item. Also when we click the opened item it will close the corresponding item. When we restrict the close behavior we unable to hide the already opened item. To prevent the closing we suggest you to use below workaround.  Workaround should be added under the create event of the accordion. 
Please prefer the below code snippet: 

@Html.EJ().Accordion("basicAccordion").ClientSideEvents(evt => evt.Create("onCreate")).EnableMultipleOpen(true).Items(data =>


                   data.Add().Text("Essential Chart").ContentTemplate(@<div>

                   Essential Chart for ASP.NET MVC is a visually stunning, high-performance charting component that is easy to use.

                                    It includes 35 chart types ranging from simple column charts to specialized financial charts.

                                    The charts are highly customizable and have a powerful data model that makes data binding simple.                   


                   data.Add().Text("Essential Schedule").ContentTemplate(@<div>

                       Essential Schedule for ASP.NET MVC is an Outlook Calendar-like scheduler control that lets you add rich scheduling capabilities to your web applications.

                                    It includes an advanced set of features including data binding, multiple resource views, rich interactivity, support for AJAX, client-side events, and much more.


                   data.Add().Text("Essential Grid").ContentTemplate(@<div>Essential Grid for ASP.NET MVC is a feature-rich control that provides extensive appearance customization options with support for grouped records. With Essential Grid for ASP.NET MVC, you can create a grid with a highly customizable look and feel. This grid is very useful for generating complex grid-based reports with rich formatting. It supports paging, sorting, grouping, filtering, and editing features. It also supports a JSON mode in which you can handle all the operations like paging and sorting. The performance of these operations in the JSON mode will be much faster than if the grid were to handle them. Essential Grid generates clean HTML in compliance with XHTML 1.0. It supports any kind of IEnumerable data source. It uses LINQ data retrieval techniques for handling data sources, and offers high performance.</div>);

function onCreate() {

        var accObj = $("#basicAccordion").data("ejAccordion");       

Note: This workaround restrict the click event of first item in accordion.   
We have prepared simple sample based on the requirement and which is available in below location:
Ragunath M


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon