Datalist- Panel for each item? Possible?

Discussion in 'ASP .Net' started by footballhead@gmail.com, Jan 9, 2006.

  1. Guest

    I have a datalist on a page and I'd like to inlcude a panel that I can
    show or hide for each item in the list. Actually, I only want to show 1
    panel at a time. Is this possible?

    I was thinking that to do this I would use a panel in the template. But
    in order to control the panels, they would each have to own unique ID
    assigned. How do I assign each panel a unique ID?

    Thanks for any help!

    Rick D.
     
    , Jan 9, 2006
    #1
    1. Advertising

  2. Hi there,

    You can use

    Panel panel = DataList.Items[row_index].FindControl("panel_ID") as Panel;

    to refer individual panel in each ‘row’ of datalist. Hence, you don't need
    assign unique ID for each panel.

    HTH

    Elton Wang


    "" wrote:

    > I have a datalist on a page and I'd like to inlcude a panel that I can
    > show or hide for each item in the list. Actually, I only want to show 1
    > panel at a time. Is this possible?
    >
    > I was thinking that to do this I would use a panel in the template. But
    > in order to control the panels, they would each have to own unique ID
    > assigned. How do I assign each panel a unique ID?
    >
    > Thanks for any help!
    >
    > Rick D.
    >
    >
     
    =?Utf-8?B?RWx0b24gVw==?=, Jan 10, 2006
    #2
    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. Rick Spiewak
    Replies:
    3
    Views:
    3,217
    Rick Spiewak
    Aug 26, 2003
  2. Harry
    Replies:
    3
    Views:
    569
    Harry Singh
    Nov 10, 2003
  3. Nevyn Twyll
    Replies:
    8
    Views:
    1,966
  4. HS1
    Replies:
    3
    Views:
    517
  5. Ulf Meinhardt
    Replies:
    0
    Views:
    649
    Ulf Meinhardt
    Jul 7, 2009
Loading...

Share This Page