Use gridview's
RowDataBound
event. Based on the condition set the visibility of the images.
protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Image img1 = (Image)e.Row.FindControl("img1");
Image img2 = (Image)e.Row.FindControl("img2");
Image img3 = (Image)e.Row.FindControl("img3");
}
}