Invisible Cells in GridView

  • Thread starter Thread starter Dot Net Daddy
  • Start date Start date
D

Dot Net Daddy

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
 
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...?
 
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?
 
any ideas?

GridView1.DataSource = <DataSet / DataReader / whatever>
GridView1.Cells(0).Visible = True
GridView1.DataBind()
GridView1.Cells(0).Visible = False
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top