Gridview - conditional formatting
- From: Not Me <not.me@xxxxxxxxxxxx>
- Date: Thu, 09 Feb 2006 17:02:07 +0000
Hey,
In order to customise rows on my gridview control, I've some code in the RowDataBound event, that works on each row, altering it's attributes..
for example I have:
If gvResults.DataKeys.Item(e.Row.RowIndex).Values.Item(1).ToString() = "True" Then
e.Row.BackColor = Drawing.Color.LightGray
e.Row.ForeColor = Drawing.Color.Black
e.Row.Cells(1).Enabled = False
which tests a rows' hidden value (in a datakey) and acts accordingly on the row... cells(1) holds a button.
Now I wish to do more to the row than just enable/disable it and change colours.. supposing I wanted to change the text on the button - is this possible?
If I do:
e.Row.Cells(1).Text = "Provide contact information"
it replaces the whole button with just some text.. how can I access the buttons' .text property?
Cheers,
Chris
.
- Follow-Ups:
- Re: Gridview - conditional formatting
- From: S. Justin Gengo [MCP]
- Re: Gridview - conditional formatting
- Prev by Date: Re: Basic ASP.NET application scope question
- Next by Date: Re: Questions for Desginers\Archiects
- Previous by thread: No download from link, when pg opened via window.showModalDialog( )
- Next by thread: Re: Gridview - conditional formatting
- Index(es):