62,244
社区成员




protected override void OnRowDataBound(GridViewRowEventArgs e)
e.Row.RowType == DataControlRowType.DataRow//判断行类型为表头
protected override void OnRowDataBound(GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
e.Row.Attributes.Add("style","width:300px;background-color:red;height:30px;");
base.OnRowDataBound(e);
}