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.
Unfortunately, activation email could not send to your email. Please try again.

Databind

Thread ID:

Created:

Updated:

Platform:

Replies:

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


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 10:43 AM

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 06:39 PM

Thanks a lot for the example

Regards

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

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.

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.

;