关于改变Gridview控件中 HyperLink控件的样式

前台代码: 后台代码:在 OnRowDataBound=" Experts_RowDataBound"事件中 protected void Experts_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow)//判定当前的行是否属于datarow类型的行 { HyperLink Link = (HyperLink)e.Row.FindControl("link_view"); Link.ForeColor = System.Drawing.Color.Brown; } }

你可能感兴趣的:(GridView)