Invisible Cells in GridView

Discussion in 'ASP .Net' started by Dot Net Daddy, Aug 15, 2006.

  1. Hello,

    Is there a way to access the invisible cells in the GridView from
    code-behind.

    Been trying this, but isn't working

    For i = 0 To GridView1.Rows.Count - 1
    If GridView1.Rows(i).Cells(1).Text.Equals("Y") Then
    GridView1.Rows(i).Cells(0).Font.Bold = False
    End If
    Next
     
    Dot Net Daddy, Aug 15, 2006
    #1
    1. Advertising

  2. Dot Net Daddy

    Mark Rae Guest

    "Dot Net Daddy" <> wrote in message
    news:...

    > Been trying this, but isn't working


    Sigh...

    How is it not working...? What's happening? What's not happening? What error
    messages are you getting...?
     
    Mark Rae, Aug 15, 2006
    #2
    1. Advertising

  3. No error messages at all. But doesnt return a result.

    The reason is Cell(1) is invisible. A friend just told that for
    security reasons the data in invisible cells are not populated. I have
    just been advised to use DataKeys, but I don't know how to do.

    I have assigned the DataKeyMember = Column1, but don't know how to
    retrieve data using DataKeys.

    any ideas?


    Mark Rae wrote:
    > "Dot Net Daddy" <> wrote in message
    > news:...
    >
    > > Been trying this, but isn't working

    >
    > Sigh...
    >
    > How is it not working...? What's happening? What's not happening? What error
    > messages are you getting...?
     
    Dot Net Daddy, Aug 15, 2006
    #3
  4. Dot Net Daddy

    Mark Rae Guest

    "Dot Net Daddy" <> wrote in message
    news:...

    > any ideas?


    GridView1.DataSource = <DataSet / DataReader / whatever>
    GridView1.Cells(0).Visible = True
    GridView1.DataBind()
    GridView1.Cells(0).Visible = False
     
    Mark Rae, Aug 15, 2006
    #4
    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:
    538
  2. Andy B
    Replies:
    5
    Views:
    605
    Andy B
    May 29, 2008
  3. JLeary

    Getting the value of invisible columns/cells

    JLeary, Jul 29, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    5
    Views:
    130
    Lewis Wang [MSFT]
    Jul 31, 2003
  4. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    319
    Joel Finkel
    Sep 1, 2003
  5. Olivier Matrot

    How to embed invisible data in cells

    Olivier Matrot, Jul 21, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    163
    Steven Cheng[MSFT]
    Jul 25, 2005
Loading...

Share This Page