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

Roadmap Question: When will the accordion have KnockoutJS support?

And perhaps my workaround is all it takes, demo here.

Key, really, is just declaring a binding handler and adding the options via the value accessor:

        ko.bindingHandlers.accordion = {
          init: function (element, valueAccessor) {
            /// <summary>Initializes the ejAccordion binding handler</summary>
            var options = ko.utils.unwrapObservable(valueAccessor());

I suppose this method could be used for any control lacking KnockoutJS support noted in this section of documentation.

3 Replies

KV Karthikeyan Viswanathan Syncfusion Team February 28, 2017 11:15 AM UTC

Hi Robert,   
Thanks for contacting Syncfusion Support.   
We already have KO support for Accordion control. You can render the Accordion using the below code. Please refer to the code snippet:   
<div id="acc" data-bind="ejAccordion: { enableMultipleOpen: true }">   
JS Playground sample link: http://jsplayground.syncfusion.com/3pnf05qt    
Karthikeyan V.  

RM Robert Mims February 28, 2017 11:36 AM UTC


I tried it but must have had a typo. 

Thank you for pointing that out. 

That being said, an update to the aforementioned documentation section might also help clarify.

Thanks again.


KV Karthikeyan Viswanathan Syncfusion Team March 1, 2017 06:13 AM UTC

Hi Robert,    
Thanks for the update.     
We are glad the suggestion helped you to achieve your requirement.  We will update the specification in our future documentation.  
Please let us know if you need further assistance.     
Karthikeyan V.  

Live Chat Icon For mobile
Up arrow icon