HI,
This is a code that i found online which is used to add a row to a datagrid data it is really nice.
private void dgView_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Item e.Item.ItemType==ListItemType.AlternatingItem)
{
DataGrid dg = (DataGrid)sender;
TableCell tc = new TableCell();
tc.Controls.Add(new LiteralControl(e.Item.Cells[9].Text));
tc.ColumnSpan = 10;
DataGridItem di = new DataGridItem(e.Item.ItemIndex,0,ListItemType.Item);
di.Cells.Add(tc);
Table t = (Table)dg.Controls[0];
t.Rows.Add(di);
}
}
Pankaj
Thursday, June 28, 2007
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment