"The target '<my dynamic control id>' for the callback could not be found or did not implement ICallBackEventHandler."
Here is my server side code used to create the combo box:
object iControl =
new RadComboBox();
((RadComboBox)iControl).Width = Unit.Pixel(200);
((RadComboBox)iControl).AllowCustomText = true;
((RadComboBox)iControl).ShowToggleImage = true;
((RadComboBox)iControl).ShowMoreResultsBox = true;
((RadComboBox)iControl).EnableLoadOnDemand = true;
((RadComboBox)iControl).EnableVirtualScrolling = true;
((RadComboBox)iControl).MarkFirstMatch = true;
((RadComboBox)iControl).ItemsRequested += new RadComboBoxItemsRequestedEventHandler(index_create_ItemsRequested);
((RadComboBox)iControl).ID = "~~~" + docFieldDef.FieldTypeName + "~~~fld~" + docFieldDef.FieldDefID.ToString();
tbCell3.Controls.Add((RadComboBox)iControl);
And here is the shell for he event handler, although this code does not get executed at present.
protected void index_create_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
<snip>
}
Please let me know if I have missed something.
Thanks,
Andy
10 Answers, 1 is accepted
Please make sure the the ComboBox is added to the Page Form's controls collection each time the page is submitted to the server - always and not only the first time or on postback.
Regards,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

I have the same problem, but I don't understand as dynamically create a RadComboBox and add this control to the Page Form's controls collection each time the page is submitted to the server. Please, can you get me a answer with more details.
Thanks,
Rene
You need to make sure that the control is added to the Form's control collection on each postback.
Ideally this should happen when the Page loads (Page_Load) on the server, outside of the "if (!Page.IsPostBack)" block (if any).
You also need to ensure that the control is added at the same place each time.
If you still experience the issue, please post here a portion of your code, which adds the control, so that I can examine it and hopefully provide the solution.
All the best,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

("The target '<my dynamic control id>' for the callback could not be found or did not implement ICallBackEventHandler.")
Here is the code snippet.
protected void grdStagingReturns_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.DataItem != null)
{
if (e.Row.RowType == DataControlRowType.Header)
{
int sortColumnIndex = GetSortColumnIndex();
if (sortColumnIndex != -1)
{
AddSortImage(sortColumnIndex, e.Row);
}
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (((StagingReturn)e.Row.DataItem).DiscoveryResult != null)
{
if (((StagingReturn)e.Row.DataItem).DiscoveryResult.DiscoveredEntity != null)
{
e.Row.Cells[3].Text = ((StagingReturn)e.Row.DataItem).DiscoveryResult.DiscoveredEntity.EntityName;
}
RadComboBox entityCombo = new Telerik.Web.UI.RadComboBox();
entityCombo.DataTextField = "EnittyName";
entityCombo.DataValueField = "EntityID";
entityCombo.DataSourceID = this.odsEntityDataSource.ID;
entityCombo.ItemsPerRequest = 10;
entityCombo.ShowMoreResultsBox = true;
entityCombo.EnableLoadOnDemand = true;
entityCombo.AllowCustomText = true;
e.Row.Cells[4].Controls.Add(entityCombo);
}
}
}
}
Please let me know if i am missing any thing or do i have to re add the controls to the page on Callback if yes how can i achieve that?
Thanks,
Rajani.
Could you please open a support ticket and send us a sample project which demonstrates the issue to examine it locally?
Regards,
Helen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

I have a dynamic RadComboBox (with autocomplete and LoadOnDemand enabled) created on the InstantiateIn method, in the edit mode of an RadGrid. I'm using an IBindableTemplate interface to construct the edit form.
The control renders in page but when I begin to edit its value, it throws the same error.
Note: Everything works ok when de Grid is in Display mode (also with ITemplate interface and the control enabled) but when I switch an Grid item into Edit mode the RadComboBox throws the error.
Thanks!

After I add dynamically a new instance of the control on a button click event, when I edit / start typing in the radcombo box, i get this error.
Please let me know how to fix this issue.
We will need some more time to fully test the case. As soon as we are ready we will post our findings.
Thank you for your patience and understanding.
All the best,
Peter
the Telerik team

In your case you have to add RadComboBox on every Page_Load event like the following:
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadComboBox combo =
new
RadComboBox();
combo.EnableLoadOnDemand =
true
;
combo.ItemsPerRequest = 20;
combo.ShowMoreResultsBox =
true
;
combo.ItemsRequested +=
new
RadComboBoxItemsRequestedEventHandler(combo_ItemsRequested);
Panel1.Controls.Add(combo);
}
protected
void
combo_ItemsRequested(
object
sender, RadComboBoxItemsRequestedEventArgs e)
{
}
protected
void
Button1_Click(
object
sender, EventArgs e)
{
}
If it doesn't help - could you please open a support ticket and send us your code to examine it locally?
Actually the solution here depends on the specific case. In general, as Simon previously said, you need to make sure that the control is added to the Form's control collection on each postback.
Regards,
Helen
the Telerik team