/// <summary>
/// 设置动态表头
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ColumsChange(object sender, GridViewRowEventArgs e)
{
string[] fieldNames = {this.lblID.Text,this.lblTM01.Text,this.lblTM02.Text,this.lblTM03.Text,
this.lblTM04.Text,this.lblTM05.Text,this.lblTM06.Text,this.lblTM07.Text,
this.lblTM08.Text,this.lblTM09.Text,
this.lblTM10.Text,this.lblTM11.Text,this.lblTM12.Text,
this.lblTM13.Text,this.lblTM14.Text,this.lblTM15.Text,this.lblTM16.Text,
this.lblTM17.Text,this.lblTM18.Text,this.lblTM19.Text}
if (e.Row.RowType != DataControlRowType.Header) return
GridViewRow gvr = new GridViewRow(0,0,DataControlRowType.Header,DataControlRowState.Normal)
for (int i = 0
{
TableCell tc = new TableCell()
tc.Text = fieldNames[i].ToString()
gvr.Cells.Add(tc)
}
this.rgDatas.Controls[0].Controls.AddAt(0,gvr)
}