62,046
社区成员
发帖
与我相关
我的任务
分享
protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Attributes.Add("style", "height:25px");
e.Row.Cells[0].Attributes.Add("style", "width:70px;align:center");
e.Row.Cells[1].Attributes.Add("style", "width:50px;align:center");
e.Row.Cells[2].Attributes.Add("style", "width:40px;align:center");
e.Row.Cells[3].Attributes.Add("style", "width:80px;align:center");
e.Row.Cells[3].Text = "<span style='color: #ff0000'> * </span>" + e.Row.Cells[i].Text;
...
}
}