XMLHttpPanel Callback Loading Error...

7 posts, 1 answers
  1. Quan Nguyen
    Quan Nguyen avatar
    19 posts
    Member since:
    Jul 2009

    Posted 13 Jul 2010 Link to this post

    Hi, I try to use RadXMLHttpPanel to load image for each radgrid row during OnRowSelected client event

    <ClientEvents OnRowSelected="RowSelected" />. I got this error:
    XMLHttpPanel Callback Loading Error:
    Exception=The target 'contentControl$RadXmlHttpPanel1' for callback could not be found or did not implement ICallBackEventHandler (screenshot attached). I am following your TELERIK.SALESDASHBOARD demo with some modifications. Below are the source codes that cause this error

    .aspx codes:

     

    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="BatchDetails.ascx.vb" Inherits="Controls_DocumentInquiry_BatchDetails" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

     

          <script type="text/javascript">

                function RowSelected(sender, eventArgs)

                {

                      var orderID = sender.get_masterTableView().get_dataItems()[eventArgs.get_itemIndexHierarchical()].getDataKeyValue("BatchNumber");

                      alert(orderID);

                      var oXmlPanel = $find("<%= RadXmlHttpPanel1.ClientID %>");

                      oXmlPanel.set_value(orderID);

                }

               

          </script>

     

    </telerik:RadScriptBlock>

     

    <div class="batchesContainer">

          <asp:Label runat="server" ID="batchdetailsTitle" CssClass="detailsTitle">Orders for</asp:Label>

          <div class="pageNav">

                <asp:LinkButton runat="server" ID="prevPage" CssClass="prevPage">Previous</asp:LinkButton>

                <asp:LinkButton runat="server" ID="nextPage" CssClass="nextPage">Next</asp:LinkButton>

          </div>

         

       

        <div class="batchDetails">

            <div class="batchdetailsGrid">

                <telerik:RadGrid AllowFilteringByColumn="true" AllowSorting="true" ShowGroupPanel="false" Height="300px" BackColor="#393939"

                ID="rgBatchDetails" runat="server" AllowPaging="true" PageSize="10" Width="480px"

                OnPreRender="rgBatchDetails_PreRender" OnNeedDataSource="rgBatchDetails_NeedDataSource" OnSelectedIndexChanged="rgBatchDetails_SelectedIndexChanged" >

                    <ClientSettings AllowDragToGroup="true" EnableRowHoverStyle="true">

                            <Selecting AllowRowSelect="true" />

                            <ClientEvents OnRowSelected="RowSelected" />

                      </ClientSettings>

                    <MasterTableView AutoGenerateColumns="false" PagerStyle-Mode="NextPrevAndNumeric" ClientDataKeyNames="BatchNumber,ImageFile"         

                            TableLayout="Fixed">

                        <Columns>

                            <telerik:GridBoundColumn DataField="BatchNumber" HeaderText="Batch Number" AutoPostBackOnFilter="true" ShowFilterIcon="false" HeaderStyle-Width="60px"  FilterControlWidth="35px">

                                  </telerik:GridBoundColumn>

                                  <telerik:GridNumericColumn DataField="ImageFile" HeaderText="Image File" AutoPostBackOnFilter="true" ShowFilterIcon="false" HeaderStyle-Width="60px"  FilterControlWidth="35px">

                                  </telerik:GridNumericColumn>

                                  <telerik:GridBoundColumn DataField="MICRValue" HeaderText="MICR/OCR" HeaderStyle-Width="300px" FilterControlWidth="260px">

                                  </telerik:GridBoundColumn>         

                                  <telerik:GridBoundColumn DataField="Amount" HeaderText="Amount" FilterControlWidth="70px">

                                  </telerik:GridBoundColumn>

                              </Columns>

     

                    </MasterTableView>

                </telerik:RadGrid>

            </div>

            <div class="batchdetailsImage">

                <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="RadXmlHttpPanel1_ServiceRequest" RenderMode="Block">

                        <asp:Image ID="imgDocumentImage" runat="server" Height="300px" Width="500px"/>

                  </telerik:RadXmlHttpPanel>

            </div>

        </div>

        <telerik:RadAjaxLoadingPanel ID="BatchesLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel>

    </div>


    .vb codes:
    When I click a TreeNode (LoadOnDemand: TreeNodeExpandMode.ServerSideCallBack)  on the main aspx page, it would load this control.

    Imports

     

    Telerik.Web.UI

     

    Imports

     

    System

     

    Imports

     

    System.Linq

     

    Imports

     

    System.Linq.Expressions

     

    Imports

     

    System.Web.UI

     

    Imports

     

    System.Data

     

    Partial

     

    Class Controls_DocumentInquiry_BatchDetails

     

     

    Inherits ContentControl

     


        Protected Sub RadXmlHttpPanel1_ServiceRequest(ByVal source As Object, ByVal e As RadXmlHttpPanelEventArgs) Handles RadXmlHttpPanel1.ServiceRequest

            Dim BatchNumber = e.Value.ToString

            imgDocumentImage.ImageUrl = "Image.aspx?ImageLocation=00000481.TIF"

        End Sub

     

    Protected

     

    Sub Page_PreRender(ByVal sender As Object, ByVal e As EventArgs)

     

     

    Dim ajaxManager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)

     

    ajaxManager.AjaxSettings.AddAjaxSetting(rgBatchDetails, rgBatchDetails, BatchesLoadingPanel)

     

    End Sub

     


     

    Protected Sub rgBatchDetails_PreRender(ByVal sender As Object, ByVal e As EventArgs)

     

     

    If rgBatchDetails.MasterTableView.Items.Count > 0 And rgBatchDetails.SelectedItems.Count = 0 Then

     

    rgBatchDetails.MasterTableView.Items(0).Selected =

    True

     

     

    End If

     

     

    End Sub

     

     

    Protected Sub rgBatchDetails_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs)

     

     

    If Session("dsBatchData") Is Nothing Then

     

     

    Else

     

    rgBatchDetails.DataSource = Session(

    "dsBatchData")

     

     

    End If

     

     

    End Sub

     


    Thank you
    Quan

  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 14 Jul 2010 Link to this post

    Hello Quan,

    Thank you for the source code. I tested it after a couple of modifications, but did not experience any problems. Could you please send the source code that adds the UserControl to the page? I have attached the sample project that I tested to the thread.

    Kind regards,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Quan Nguyen
    Quan Nguyen avatar
    19 posts
    Member since:
    Jul 2009

    Posted 14 Jul 2010 Link to this post

    THank you. I got this working by using loading control in Page_Load of the main aspx.

     

  5. Answer
    Pero
    Admin
    Pero avatar
    1156 posts

    Posted 15 Jul 2010 Link to this post

    Hi Quan,

    I am glad that you resolved the problems, and everything is working fine now. Please take into consideration, when working with the XmlHttpPanel, the page does not go through its full page lifecycle. There is no ViewState, the server-side events does not get executed, and the control tree is not recreated. That's why the XmlHttpPanel does not support many of the scenarios that are easily implemented with the Ajax panel.

    More information about the RadXmlHttpPanel control can be found on our online documentation: http://www.telerik.com/help/aspnet-ajax/radxmlhttppanel-getting-started.html.

    Sincerely yours,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Francis Frank
    Francis Frank avatar
    35 posts
    Member since:
    Mar 2010

    Posted 13 Oct 2010 Link to this post

    Please Team,

    I want to bring to your notice that RadXmlHttp control does not support controls like Combo, Button or Textbox.
    when tried gives  a call back loading error
  7. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 15 Oct 2010 Link to this post

    Hello Frank,

    Could you please be more specific, what kind of callback errors do you get? I created a simple application to test for a problem, but did not experience any errors. The XmlHttpPanel has RadComboBox, Button and TextBox controls, that are updated with the XmlHttpPanel.
    Please find the code attached to the thread.

    All the best,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Francis Frank
    Francis Frank avatar
    35 posts
    Member since:
    Mar 2010

    Posted 23 Oct 2010 Link to this post

    sorry for my delayed responce.

    Thanks for the attached code but i do not know why my code was giving me that error.
    I had to use ajax instead of xmlhttp.
    I hope i find it convinient to try again.
    Thanks for ur responce

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017