This is a migrated thread and some comments may be shown as answers.

Target for the callback could not be found

8 Answers 440 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Duncan
Top achievements
Rank 2
Duncan asked on 14 Jan 2012, 11:51 PM
I have a RadComboBox that was working great. I then decided to move the ComboBox to a usercontrol, using a RadAjaxManagerProxy control. I'm loading items on demand. The error that i get specifically is this:

The target 'ctl00$ph_content$ctl00$cboCompany' for the callback could not be found or did not implement ICallbackEventHandler.

I belive ctl00$ph_content$ctl00$cboCompany is the wrong location for the ComboBox now that it is in the UserControl.

Has anyone seen this behavior and know a fix?

Thanks,
Duncan

8 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 18 Jan 2012, 06:41 PM
Hi Duncan,

You could refer to the following forum thread: ...did not implement ICallbackEventHandler message, discussing the same error.

If this is not helping, please paste the code here, or open a support ticket where a sample project regarding this issue, can be attached. Instructions how to isolate a problem in a sample page could be found at (http://blogs.telerik.com/blogs/posts/10-09-29/isolating-a-problem-in-a-sample-project.aspx).

Greetings,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Erik
Top achievements
Rank 2
answered on 11 Feb 2013, 04:42 PM
Hello all,

I had the same problem. I solved this:

I have a system that creates an usercontrol (view/module) dynamically. In the loading system was an exclusion like this:

Private Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
    If Not IsCallback Then LoadViewControl(True)
End Sub

So, in the callback situation the control is not reloaded in the init, so the viewstate can't be replaces and callback links do not have a control to refer on... Removing the if was the solution, obviously... :-)

Regards,

Erik

0
Nencho
Telerik team
answered on 14 Feb 2013, 09:29 AM
Hello Erik,

Thank you for sharing your solution with the community.

Kind regards,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Marc
Top achievements
Rank 1
answered on 21 May 2013, 10:41 PM
Hi,

I am experiencing the exact problem described in this threat... I am loading a User Control dynamically from the masterpage's code behind and the included Combobox with EnableAutomaticLoadOnDemand = true fails on loading with the message: The target 'XXXXXXXXXXXXXXXXXXX' for the callback could not be found or did not implement ICallbackEventHandler.

Did you find a solution finally?

My UC code:
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ProductList">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ProductList" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadComboBox ID="ProductList" runat="server" DataTextField="Name" EnableAutomaticLoadOnDemand="true" MarkFirstMatch="true" EnableItemCaching="true" Filter="Contains" DataValueField="Id" ShowMoreResultsBox="true" EnableVirtualScrolling="true" ItemsPerRequest="20" Width="350px"></telerik:RadComboBox>

My UC code behind:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim sqlDS As New SqlDataSource
            sqlDS.ConnectionString = connString 'Defined previously
            sqlDS.SelectCommand = sqlQuery 'Defined previously
            ProductList.DataSource = sqlDS
            ProductList.DataBind()
End Sub

MasterPage code behind loads the UC with LoadControl. Masterpage also includes RadAjaxManager.

Thanks.
0
Hristo Valyavicharski
Telerik team
answered on 27 May 2013, 05:33 AM
Hi Marc,

I have tested your code under FF21/IE10/Chrome27 with the latest build 2013.2.522 and there was no such issue. Would you please let us know what version of Telerik assemblies you are using?

Thanks.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Marc
Top achievements
Rank 1
answered on 27 May 2013, 11:04 PM
Hi Hristo,

I am using version 2013.1.403.45. I tested the code outside the NestedViewTemplate and it works as expected, the problem appears only when I load the Combobox inside the UserControl in the NestedViewTemplate of Radgrid...

Can you please confirm if it works well for you too in this scenario?

Thanks!
0
Hristo Valyavicharski
Telerik team
answered on 30 May 2013, 03:04 PM
Hi Marc,

I moved the UserControl inside the NestedViewTemplate, but again I was not able to reproduce the described behavior. I'm attaching my testing sample. Please check it out and let me know if I have missed something. In addition, you could open a new support ticket and attach a runnable sample, demonstrating the problem, so we could inspect it locally.

Thanks.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Marc
Top achievements
Rank 1
answered on 31 May 2013, 10:43 PM
Hi Hristo,

I found the problem and it's totally my mistake... after looking at my code I just figured out that the UC are created on ItemDataBound event instead of ItemCreated. Logically all my UC were lost on postback!

thanks for your help!
Tags
ComboBox
Asked by
Duncan
Top achievements
Rank 2
Answers by
Ivana
Telerik team
Erik
Top achievements
Rank 2
Nencho
Telerik team
Marc
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Share this question
or