1. <asp:DataGrid AutoGenerateColumns="false" ...and add templates for other columnsor2. in ItemDataBound event handler, remove the original title column<asp:DataGrid OnItemDataBound="DataGrid1_OnItemDataBound" ...void DataGrid1_OnItemDataBound(Object sender, DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
e.Item.Cells.RemoveAt(n); //change n to the sequence number for the old title column
}
}
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
e.Item.Cells.RemoveAt(n); //change n to the sequence number for the old title column
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货