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

Databinding to an Accordion

How to bind the data in accordian.i want to create a accordian items dynamicaly and add controls dynamically in server side events.

like this 

        SqlConnection sqlConn = new SqlConnection("Data Source=AICS\\SQLEXPRESS;Initial Catalog=ACTP;Integrated Security=True");
        SqlCommand sqlSelect = new SqlCommand("select  [CatName] from [Category] ", sqlConn);
        sqlSelect.CommandType = System.Data.CommandType.Text;
        SqlDataAdapter sqlAdapter = new SqlDataAdapter(sqlSelect);
        DataSet myDataset = new DataSet();
        sqlAdapter.Fill(myDataset); 
        Accordion1.DataSource = myDataset.Tables[0].DefaultView;
        Accordion1.DataBind();

1 Reply

AP Arun Palaniyandi Syncfusion Team March 24, 2016 01:33 PM UTC

Hi Alavudeen,

Thanks for contacting Syncfusion support.

Query:”How to bind the data in accordian.i want to create a accordian items dynamicaly and add controls dynamically in server side events.”


We have a created a sample web application to create accordion items dynamically using SQL server database at code behind.

Please find the sample in the following link:
http://www.syncfusion.com/downloads/support/forum/123496/ze/WebApplication1-603286207


Please let us know if you have any other concerns.


Regards,

Arun P


Loader.
Live Chat Icon For mobile
Up arrow icon