我是按照这种方式来画出表头的,首先原单元格清除,但是排序确没有用了.请高手门提出解决的办法.
private void dgShowData_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Header)
{ TableCellCollection tcl=e.Item.Cells; //General Information
tcl.Clear();
//列头第一行
tcl.Add(new TableHeaderCell());
tcl[0].Attributes.Add( "colspan ", "3 ");
tcl[0].Text= "General Information ";
.......
.......
}
}
private void dgShowData_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Header)
{ TableCellCollection tcl=e.Item.Cells; //General Information
tcl.Clear();
//列头第一行
tcl.Add(new TableHeaderCell());
tcl[0].Attributes.Add( "colspan ", "3 ");
tcl[0].Text= "General Information ";
.......
.......
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货