M
mcrowell
Here's my code:
DataGridItem row = new DataGridItem(-1, -1, ListItemType.Separator);
TableCell cell = new TableCell();
row.Cells.Add(cell);
cell = new TableCell();
cell.Text = "New Header";
row.Cells.Add(cell);
cell = new TableCell();
row.Cells.Add(cell);
dgSites.Controls[0].Controls.Add(row);
I get the following error:
Specified argument was out of the range of valid values. Parameter
name: index
Line 432: dgSites.Controls[0].Controls.Add(row);
What's the problem here? Any help appreciated. Thanks.
DataGridItem row = new DataGridItem(-1, -1, ListItemType.Separator);
TableCell cell = new TableCell();
row.Cells.Add(cell);
cell = new TableCell();
cell.Text = "New Header";
row.Cells.Add(cell);
cell = new TableCell();
row.Cells.Add(cell);
dgSites.Controls[0].Controls.Add(row);
I get the following error:
Specified argument was out of the range of valid values. Parameter
name: index
Line 432: dgSites.Controls[0].Controls.Add(row);
What's the problem here? Any help appreciated. Thanks.