in gridview assign event handler for RowDataBound event as :
OnRowDataBound="gvFunds_RowDataBound"
The event handler will be similar to the following one :
protected void gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView dv = ((System.Data.DataRowView)(e.Row.DataItem));
Button btnEdit = (Button)e.Row.FindControl("btnTohide");
if(dv["MyText"] != "ExpectedText")
{
btnEdit.Visible =false;
}
}
}