1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| sub GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
ChildTable table = e.Row.Parent as ChildTable;
if (table != null)
Dim row As New GridViewRow(-1, -1, DataControlRowType.EmptyDataRow, DataControlRowState.Edit)
Dim cell As New TableCell
cell.ColumnSpan = GridView1.Columns.Count - 1
'cell.Width = Unit.Percentage(100)
cell.Controls.Add(new LiteralControl("New Row"))
row.Cells.Add(cell)
table.Rows.Add(row)
end if
end if
end sub |