0
string search= textbox1.text;
protected void grd_RowDataBound(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
foreach(TableCell tc in e.Row.Cells)
{
tc.Text = tc.Text.Replace(search, "<span style='color:Red;'>" + search + "</span>");
}
}
}
我使用的代码要突出一个字搜索,但是当我在调试浏览器按钮:编辑,选择,删除不存在的。而如果我删除了事件按钮回来了。GridView控件上的RowDataBound,编辑,删除,选择选项dissappeared
我该怎么做要做到这一点是检查,看看是否单元格中包含控制