
04-25-2007, 08:48 AM
|
 |
Cum Grano Salis
Retired Moderator * Guru *
|
|
Join Date: Jul 2002
Location: Baltimore, Maryland
Posts: 14,636
|
|
Note you are also dealing with postbacks in a web environment. Controls will not be re-rendered per say, until a postback has been conducted on the server. With that being said, the value of "true" will exist in some row in some column. Will the query always return true or false for an entire column?
How are you populating the GridView? Are you using a SQL or ObjectDatabase? If so, on Page load or postback ASP.net under the covers is reloading the assigned query. Or are you populating the Grid programmatically through some sub routine?
If you are using the SQLDataSource and basically letting ASP.net do the data load for you, you can write code in the Selected() event, or basically after the query has fetched the data from the server and evaluate your process there.
Code:
btnTarget.Enabled = Convert.ToBoolean(<the target column or cell value>)
etc....
|
__________________
"Artificial Intelligence is no match for natural stupidity." ~unknown
|