Are you doing this on postback? Non-visible controls don't come back in
postbacks. A good place for non-visible values is DataKeys collection.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Keith G Hicks" <> wrote in message
news:...
>I have a gridview (asp.net 2.0) where I'm trying to format rows based on a
> NON VISIBLE column. It doesn't seem to work. When column 0 below is
> visible,
> the row is formatted as expected but when it's not, it doesn't do
> anything.
> How can I do this so that the formatting is based on the value of a
> non-visible column?
>
> If e.Row.RowType = DataControlRowType.DataRow Then
> If e.Row.Cells(0).Text = "1" Then
> e.Row.Font.Bold = True
> e.Row.Font.Italic = True
> e.Row.ForeColor = Drawing.Color.DarkBlue
> e.Row.Cells(1).Text = " " & e.Row.Cells(1).Text
> End If
> End If
>
> Thanks,
>
> Keith
>
>