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

Databind

Thread ID:

Created:

Updated:

Platform:

Replies:

130598 May 19,2017 04:17 PM UTC May 23,2017 04:33 AM UTC ASP.NET MVC 3
loading
Tags: Accordion
jaime
Asked On May 19, 2017 04:17 PM UTC


How to bind the data in accordion.I want to create a accordion with items dynamically and add controls dynamically from database, there anyway to do this?

Keerthana Rajendran [Syncfusion]
Replied On May 22, 2017 02:43 PM UTC

Hi Jaime, 
 
Thank you for contacting Syncfusion support 
 
We have prepared a sample in Accordion. In order to add items dynamically to accordion we suggest you to use addItem method of Accordion 
 
@Html.EJ().Button("button1").ClientSideEvents(e => e.Click("OnChange")).Text("Add Item"); 
 
function OnChange() 
        { 
           
            var TermDetailContent = [{ "ID": "Header1", "Description": "Content1" }]; 
            var accObj = $("#contentAccordion").data("ejAccordion"); 
            
            for (var j = 0; j < TermDetailContent.length; j++) { 
                        
                 var item = TermDetailContent[j]; 
                 accObj.addItem(item.ID, item.Description, j); 
                            } 
            } 
 
Sample Link: Sample2015534317.zip 
 
 
 
 
Regards, 
Keerthana. 


jaime
Replied On May 22, 2017 10:39 PM UTC

Thanks a lot for the example

Regards

Keerthana Rajendran [Syncfusion]
Replied On May 23, 2017 04:33 AM UTC

Hi Jaime, 
 
Thanks for your update. Please get back to us if you require any further assistance on this. We will be happy to assist you 
 
Regards, 
Keerthana. 


CONFIRMATION

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.

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

;