Handle the ItemDataBound event. This gets fired for every row after data
binding happens. You can then access e.Item.DataItem and get your has_picture
column value. Once you have done that and decide you want to modify that
row, then you can access e.Item.Cells to get the cell with your hyperlink,
use FindControl to get the reference then you can tweak any properties on
it you want.
-Brock
DevelopMentor
http://staff.develop.com/ballen hi all,
I created a dataset and binded it to datagrid, it displays okay.
But
now I need to add a link to a column name has_picture, if
has_picture=1 then
link shows
else if has_picture=0 then link doesn't show. Basically I don't know
how to
implement such a logic. I am assuming I need to do this in codebehind
but
how?