Repeater Question

Discussion in 'ASP .Net' started by Just Me, Sep 18, 2007.

  1. Just Me

    Just Me Guest

    If this is already posted, please excuse me, I sent it to the server but it
    never appeared

    Im using ASP.NET 2.0 and I have a repeater question.

    I am trying to make a change to the ItemTemplate in the itemdatabound event.

    Basically, this is a follow on from my previous question anyhow. I have rows
    being display like so


    Category Data Data Data
    Green 1 2 3
    Green 2 2 2
    Blue 4 2 1
    Blue 5 5 4


    What I want out of my repeater "WHEN" the category changes

    <tr>
    <td colspan=4>'TheCategory"</td>
    </td>
    <tr>
    <td>Category</td>
    <td>Data1</td>
    <td>Data2</td>
    <td>Data3</td>
    </tr>

    And when "NOT CHANGED"
    <tr>
    <td>Category</td>
    <td>Data1</td>
    <td>Data2</td>
    <td>Data3</td>
    </tr>

    So this would result in

    Green
    1 2 3
    2 2 2

    Blue
    4 2 1
    5 5 4


    This means I have to manipulate the ItemTemplate, but im not sure how to go
    about doing this in the Databound event. I need to hide / not display the
    category row. Im sure there is an easy way to do this, but im struggling.


    Cheers
     
    Just Me, Sep 18, 2007
    #1
    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. Replies:
    0
    Views:
    877
  2. Replies:
    0
    Views:
    2,904
  3. Replies:
    1
    Views:
    7,048
    Karl Seguin
    Aug 10, 2005
  4. uncensored
    Replies:
    0
    Views:
    830
    uncensored
    Oct 25, 2006
  5. Microsoft

    Repeater inside a Repeater

    Microsoft, Aug 21, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    214
    Microsoft
    Aug 21, 2006
Loading...

Share This Page