Hello,
you can set the row hidden in the grid view control in its databound event as follows:
protected void gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if(conditionToHideRow== true)
{
e.Row.Style.Add("visibility", "hidden");
e.Row.Style.Add("display", "none");
}
}
}