Groups | Blog | Home
all groups > asp.net > august 2006 >

asp.net : Invisible Cells in GridView


Dot Net Daddy
8/14/2006 11:51:52 PM
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
Mark Rae
8/15/2006 12:00:00 AM
[quoted text, click to view]

Sigh...

How is it not working...? What's happening? What's not happening? What error
messages are you getting...?

Mark Rae
8/15/2006 12:00:00 AM
[quoted text, click to view]

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

Dot Net Daddy
8/15/2006 1:05:43 AM
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?


[quoted text, click to view]
AddThis Social Bookmark Button