3 Answers, 1 is accepted
Can you please post a bit more info about how this control is created? I will gladly help you to resolve this issue.
Best wishes,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

When the page loads i create a button control and then add it to the page in the Page load event. when i click the button it needs to add another row to the table which contains a datetime picker and another button. when i click the button it adds the first row but when i click the same button again it throws the error.
Hope this helps.
this is something like the page load and the privSubAddRow event:
Panel
panel;
ImageButton imgBtn;
TableCell tblCell;
TableRow tblRow;
Telerik.Web.UI.RadDateTimePicker dtp;
tblRow = new TableRow();
tblCell = new TableCell();
panel = new Panel();
imgBtn = new ImageButton();
dtp = new Telerik.Web.UI.RadDateTimePicker();
tblCell.Controls.Add(dtp);
tblRow.Cells.Add(tblCell);
tblCell = new TableCell();
imgBtn.ID =
"0|btn|" + intFieldID.ToString();
imgBtn.Click += new ImageClickEventHandler(privSubAddRow);
panel.Controls.Add(imgBtn);
panel.Visible = true;
tblCell.Controls.Add(panel);
tblRow.Cells.Add(tblCell);
tbl1.Rows.Add(tblRow);
protected
void privSubAddRow(object sender, EventArgs e)
{
Table
tbl1;
Panel panel;
ImageButton imgBtn;
TableCell tblCell;
TableRow tblRow;
Telerik.Web.UI.RadDateTimePicker dtp;
tblRow = new TableRow();
tblCell = new TableCell();
panel = new Panel();
imgBtn = new ImageButton();
tbl1 = ((Table)((ImageButton)sender).Parent.Parent.Parent.Parent)
dtp = new Telerik.Web.UI.RadDateTimePicker();
tblCell.Controls.Add(dtp);
tblRow.Cells.Add(tblCell);
tblCell = new TableCell();
imgBtn.ID =
"0|btn|" + intFieldID.ToString();
imgBtn.Click += new ImageClickEventHandler(privSubAddRow);
panel.Controls.Add(imgBtn);
panel.Visible = true;
tblCell.Controls.Add(panel);
tblRow.Cells.Add(tblCell);
tbl1.Rows.Add(tblRow);
}
Regards,
Sean Schoeman
When you place more than one server control within the same naming container with same ID there will be an error raised. If you place ajax enabled controls when the page loads most probably javascript errors will be raised, because the framework won't be able to handle their client objects properly.
For your convenience I've prepared a sample project which is one possible solution in the scenario you have.
You can find it attached to this post.
Kind regards,
NikR
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.