怎么在webform里实现
这样的样式呢? | 类型 |
时间 |-----------------------| 其它
| 类型1 | 类型2 | 类型3 |
-------------------------------------------
05/08/01 |999999 |999999 |999999 |9999999
这样的样式呢? | 类型 |
时间 |-----------------------| 其它
| 类型1 | 类型2 | 类型3 |
-------------------------------------------
05/08/01 |999999 |999999 |999999 |9999999
private void DataGrid1_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Header)
{
Table t = (Table)DataGrid1.Controls[0]; DataGridItem tr = new DataGridItem(0,0,ListItemType.Header);
TableCell tc;
tc = new TableCell();
tr.Cells.AddAt(0,tc);
tc = new TableCell();
tc.Text = "一季度";
tc.ColumnSpan = 2;
tr.Cells.AddAt(0,tc); tr.Cells[0].ColumnSpan = 2;
tr.Cells[1].Visible = false;
t.Rows.AddAt(0,tr);
}
}