Can the ItemHeader repeat for each "section break" in a Repeater?

Discussion in 'ASP .Net' started by Mike Lerch, Mar 4, 2004.

  1. Mike Lerch

    Mike Lerch Guest

    I have data like this:

    Album Song
    Led Zeppelin I Good Times Bad Times
    Led Zeppelin I Babe I'm Gonna Leave You
    Led Zeppelin I You Shook Me
    Led Zeppelin I Dazed and Confused
    Led Zeppelin II Whole Lotta Love
    Led Zeppelin II The Lemon Song
    Led Zeppelin II Heartbreaker

    Is it possible for a repeater to show the Header each time the album
    changes? In other words something like

    Led Zeppelin I (Header)
    Good Times Bad Times (Item)
    Babe I'm Gonna Leave You (Item)
    You Shook Me (Item)
    Dazed and Confused (Item)
    Led Zeppelin II (Header)
    Whole Lotta Love (Item)
    The Lemon Song (Item)
    Heartbreaker (Item)

    Any help is appreciated! PS, if the repeater won't do it, is there a
    control that will?

    Lerch
    Mike Lerch, Mar 4, 2004
    #1
    1. Advertising

  2. You could have :
    - a repeater than handles the album and an inner repeater that handles the
    titles...
    - or a single repepater with a part you show/hide depending on wether or not
    this is a new album.
    - or a single repeater with a datasource that unions album titles and titles
    - or a custom template class that output the album title when appropriate

    3) is probably the simplest. Use just something like :

    SELECT Album_pk,0,Title FROM Albums UNION SELECT Album_fk,Number,Title FROM
    Titles ORDER BY 1,2 for your datasource...

    Patrice

    --

    "Mike Lerch" <> a écrit dans le message de
    news:...
    > I have data like this:
    >
    > Album Song
    > Led Zeppelin I Good Times Bad Times
    > Led Zeppelin I Babe I'm Gonna Leave You
    > Led Zeppelin I You Shook Me
    > Led Zeppelin I Dazed and Confused
    > Led Zeppelin II Whole Lotta Love
    > Led Zeppelin II The Lemon Song
    > Led Zeppelin II Heartbreaker
    >
    > Is it possible for a repeater to show the Header each time the album
    > changes? In other words something like
    >
    > Led Zeppelin I (Header)
    > Good Times Bad Times (Item)
    > Babe I'm Gonna Leave You (Item)
    > You Shook Me (Item)
    > Dazed and Confused (Item)
    > Led Zeppelin II (Header)
    > Whole Lotta Love (Item)
    > The Lemon Song (Item)
    > Heartbreaker (Item)
    >
    > Any help is appreciated! PS, if the repeater won't do it, is there a
    > control that will?
    >
    > Lerch
    Patrice Scribe, Mar 4, 2004
    #2
    1. Advertising

  3. Mike Lerch

    Mike Lerch Guest

    On Thu, 4 Mar 2004 14:32:23 +0100, "Patrice Scribe"
    <> wrote:

    >You could have :
    >- a repeater than handles the album and an inner repeater that handles the
    >titles...


    Thanks for your help! That's the technique I chose to go with,
    following some code at
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;306154

    Now I just have to figure out if I can actually add and update and
    delete stuff using this technique (i.e. this displays my current data
    but I'd like to use something similar to, for instance, add comments
    on each song or something)

    Lerch
    Mike Lerch, Mar 4, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SamIAm
    Replies:
    5
    Views:
    5,645
    S. Justin Gengo
    Jan 7, 2004
  2. Raja
    Replies:
    0
    Views:
    151
  3. Mike Lerch

    Can the ItemHeader repeat for each "section break"?

    Mike Lerch, Mar 3, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    103
    Mike Lerch
    Mar 3, 2004
  4. TJ

    Can a Repeater control repeat an .ascx?

    TJ, Jul 19, 2006, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    1,104
    Alessandro Zifiglio
    Jul 19, 2006
  5. Diane Yocom

    Insert Section Break in RTF?

    Diane Yocom, Jun 1, 2004, in forum: ASP General
    Replies:
    5
    Views:
    260
    Alan Howard
    Jun 3, 2004
Loading...

Share This Page