日期:2014-05-18 浏览次数:20536 次
#region switch (e.Row.RowType) { case DataControlRowType.Header: //第一行表头 TableCellCollection tcHeader = e.Row.Cells; tcHeader.Clear(); tcHeader.Add(new TableHeaderCell()); //tcHeader[0].Style = "font-family:@MS Gothic"; tcHeader[0].Attributes.Add("rowspan", "3"); //跨Rowborder:1; ; //tcHeader[0].Attributes.Add("bgcolor", "white"); tcHeader[0].Text = "社区"; tcHeader[0].Style.Value = "border-bottom-color: #333333;border-right-color: #999999;height: 25px;font-family: \"宋体\";font-size: 12px;font-weight: bold;"; } #endregion
------解决方案--------------------
switch (e.Row.RowType)
{
case DataControlRowType.Header:
//第一行表头
TableCellCollection tcHeader = e.Row.Cells;
tcHeader.Clear();
tcHeader.Add(new TableHeaderCell());
//tcHeader[0].Style = "font-family:@MS Gothic";
tcHeader[0].Attributes.Add("rowspan", "3"); //跨Rowborder:1; ;
//tcHeader[0].Attributes.Add("bgcolor", "white");
tcHeader[0].Text = "社区";
tcHeader[0].Style.Value = "border-bottom-color: #333333;border-right-color: #999999;height: 25px;font-family: \"宋体\";font-size: 12px;font-weight: bold;";
}
RowsCreated事件中