Friday, May 01, 2009

locate and hide BoundField in gridview asp.net c#



protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (Convert.ToString(DataBinder.Eval(e.Row.DataItem, "ABC")) == "Text To Be Found")
e.Row.Visible = false;
}
}

No comments: