I would suggest you to write your logic in
RowDataBound event of the GridView control as follows:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
ImageButton btnPrint = (ImageButton)e.Row.FindControl("btnPrint");
string status = e.Row.Cells[3].Text;
if (status == "signed")
{
btnPrint.Visible = true;
}
else
{
btnPrint.Visible = false;
}
}
}
Here I'm assuming that third column of the data source having the status value (i.e. signed / pending).
Please let me know in case you need the complete code.