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

Callback error using RadXmlHttpPanel

1 Answer 82 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
plusHR
Top achievements
Rank 1
plusHR asked on 16 Apr 2012, 03:55 PM
Hi.

i have a user control that has a RadXmlHttpPanel and a Grid however when I click on the row to load the detail I get an error message saying that the callback could not be found or implements ICallbackHandler. Could you assist.

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        function RowSelected(sender, eventArgs) {
            var grid = sender;
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
            var id = eventArgs.getDataKeyValue("C_n_Id");
            alert(id);
            var oXmlPanel = $find("<%= RadXmlHttpPanel1.ClientID %>");
            oXmlPanel.set_value(id);
        }
 
          
    </script>
</telerik:RadScriptBlock>
<div class="ordersContainer">
    <asp:Label runat="server" ID="ordersTitle" CssClass="ordersTitle">Orders for</asp:Label>
    <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="RadXmlHttpPanel1_ServiceRequest"
        RenderMode="Block" EnableClientScriptEvaluation="true">
       <asp:TextBox ID="TextBox1" runat="server" /><br />
    </telerik:RadXmlHttpPanel>

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 18 Apr 2012, 12:12 PM
Hello Paul,

I tried to reproduce the described problem using the provided code, but to no avail. Please compare the attached test sample with your actual project and let me know if I have missed something. Note that I replaced the RadGrid with a button control as in this scenario the grid is used for triggering the callback and the effect will be the same if a button is used for this purpose. Here you can find a screen capture of the behavior on my end.

Such a problem can be encountered when ASP.NET client callbacks are used and controls are added dynamically to the page in events which are not run during the client callback. In a client callback the page runs in a modified page life cycle - the page is initiated and its controls and other members are created. If the RadXmlHttpPanel is dynamically added on the page, it will not be re-created when the XmlHttpPanel's client callback is in process and the target control for the client callback (i.e. the RadXmlHttpPanel) could not be found because it is not present (it wasn't recreated) on the page.

If you are still having difficulties, please open a support ticket and send a modified version of the attached sample so that the issue can be reproduced. In case you are not able to achieve this, you can also provide a simple, fully runnable page that isolates the problematic behavior so that I can inspect it locally and suggest an according solution.

Regards,
Slav
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.
Tags
XmlHttpPanel
Asked by
plusHR
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or