我需要TemplateField
在a中添加工具提示GridView
,但只能Row
满足某些条件.我怎样才能做到这一点?
protected void GridView1_DataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { // check for condition if (e.Row.Cells[0].Text.Contains("sometext")) { e.Row.ToolTip = "Text to be shown on mouseover of the row"; } } }