Complex Data Binding with the Accordion Control
page 2 of 6
by Brian Mains
Feedback
Average Rating: 
Views (Total / Last 10 Days): 41073/ 71

Header/Content Template

Within the accordion control, it is possible to bind data to the header and content templates. However, the header and content template have a one-to-one relationship, meaning that one header template matches one content template. Let me illustrate this; look at the following example which binds Customer records to an accordion.

Listing 1

<ajax:Accordion id="accSingleData" runat="server">
  <HeaderTemplate>
    <asp:Label ID="lblLastName" runat="server" Text='<%# Eval("LastName") %>' />
  </HeaderTemplate>
  <ContentTemplate>
    <asp:Label ID="lblFirstName" runat="server" Text='<%# Eval("FirstName") %>' />
  </ContentTemplate>
</ajax:Accordion>

If you expect this example to group entries by last name, it will not; rather, a pane is created for each customer, with the last name as the header and the first name as the content. It is a one-to-one relationship.


View Entire Article

User Comments

Title: Need Code   
Name: Dorababu
Date: 2011-11-20 12:55:11 PM
Comment:
Hi i am unable to view the article can any one post me the code used in this please
Title: I don't have any   
Name: Seyed
Date: 2009-12-08 7:45:02 PM
Comment:
Big time saver. Thanks for this great posting
Title: Thanks   
Name: Lee
Date: 2009-11-23 7:59:39 AM
Comment:
It is a great article. will be helpful if u can provide me the all related code + screenshots

hyperguys@hotmail.com
Title: Good Article......   
Name: WebEye
Date: 2008-08-30 5:51:42 AM
Comment:
Very good article...help me a lot.
You can find very much same article here...

http://www.aspdotnetcodes.com/Easy_Data_Binding_Accordion_GridView.aspx

And running example of this article here...

http://www.aspdotnetcodes.com/Accordion_Data_Binding_GridView_Example.aspx
Title: Nice Article   
Name: Imran Ahmad Mughal
Date: 2008-07-08 1:09:50 AM
Comment:
It's really a nice article. Can you please provide me the sample project in which you have implemented this?

Thanks
Title: Thanks   
Name: Subalakshmi
Date: 2008-07-03 6:39:09 AM
Comment:
A very Good article,to implement in my website.
Title: Thanks   
Name: Prashanth
Date: 2008-07-03 5:16:01 AM
Comment:
Great article, one small suggestion, if you have a sample application to download and some screen shots of the page it would be very helpful.

prashanthganathe@gmail.com
Title: Thank You :)   
Name: Qureshi
Date: 2008-07-01 9:20:20 AM
Comment:
hi

i realy want to say thanks

bcoz i really want a article on this

thaks a tan






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-26 2:25:59 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search