Target for the callback could not be found

9 posts, 0 answers
  1. Duncan
    Duncan avatar
    93 posts
    Member since:
    Jul 2012

    Posted 14 Jan 2012 Link to this post

    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
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 18 Jan 2012 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 11 Feb 2013 Link to this post

    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

  5. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 14 Feb 2013 Link to this post

    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.
  6. Marc
    Marc avatar
    17 posts
    Member since:
    Jan 2013

    Posted 21 May 2013 Link to this post

    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.
  7. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 27 May 2013 Link to this post

    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.
  8. Marc
    Marc avatar
    17 posts
    Member since:
    Jan 2013

    Posted 27 May 2013 Link to this post

    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!
  9. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 30 May 2013 Link to this post

    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.
  10. Marc
    Marc avatar
    17 posts
    Member since:
    Jan 2013

    Posted 31 May 2013 Link to this post

    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!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017