GridView: how to hide/show controls based on a value in another cell?

Discussion in 'ASP .Net' started by dan, Apr 18, 2008.

  1. dan

    dan Guest

    Hi,

    I have a GridView with five columns. One of the column renders its content
    either as a FileUpload or TextBox - depending on a value in another cell. I
    created an EditItemTemplate for the column and placed both controls in it.
    The controls' Visible property is initially set to false for both of them.
    Based on a value of another field I'd like to be able to set Visible
    property to true for one of the controls.
    Could someone please let me know the best way of doing this?

    Thanks,
    Dan
     
    dan, Apr 18, 2008
    #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. mark | r
    Replies:
    2
    Views:
    976
    mark | r
    Sep 17, 2003
  2. Susanne West
    Replies:
    4
    Views:
    1,377
    Susanne West
    Nov 15, 2006
  3. RJ
    Replies:
    1
    Views:
    249
    Eliyahu Goldin
    Feb 17, 2005
  4. Steve Speirs
    Replies:
    0
    Views:
    163
    Steve Speirs
    Jun 27, 2003
  5. ll
    Replies:
    2
    Views:
    662
    Thomas 'PointedEars' Lahn
    May 1, 2008
Loading...

Share This Page