gridview自定义表头后 为何数据格式不能对齐
Protected Sub G1_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles G1.RowCreated
Select Case e.Row.RowType
Case DataControlRowType.Header
Dim TH As TableCellCollection = e.Row.Cells
TH.Clear()
'重新绘制表头
TH.Add(New TableHeaderCell)
TH(0).Attributes.Add( "rowspan ", 3) '合并3行
TH(0).Attributes.Add( "bgcolor ", "white ")
TH(0).Text = " "
TH.Add(New TableHeaderCell)
TH(1).Attributes.Add( "colspan ", 7) '合并7列
TH(1).Text = "收入信息 <tr> "
'绘制第二行表头
TH.Add(New TableHeaderCell)
TH(2).Attributes.Add( "align ", "left ")
TH(2).Text = "功 能 "
'绘制第三行表头
TH.Add(New TableHeaderCell)
TH(3).Attributes.Add( "align ", "left ")
TH(3).Text = "编 号 "
'绘制第四行表头
&nbs