Issue with Chrome and a RadAjaxManager

4 posts, 0 answers
  1. Corentin
    Corentin avatar
    6 posts
    Member since:
    Jul 2014

    Posted 24 Jul 2014 Link to this post

    Hi,

    I'm experiencing a strange issue with a RadAjaxManager and chrome  (IE10 work fine) :
    I've defined my RadAjaxManager like this :

    <telerik:RadAjaxManager ID="PageRadAjaxManager" runat="server" OnAjaxRequest="PageRadAjaxManager_AjaxRequest">
       <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="PageRadAjaxManager">
             <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="GalopRadGrid"LoadingPanelID="PageRadAjaxLoadingPanel" />
             </UpdatedControls>
          </telerik:AjaxSetting>
       </AjaxSettings>
    </telerik:RadAjaxManager>


    And I call a javascript function to refresh my control "GalopRadGrid" :

    function DoRefreshGalopGrid() {
       var arguments = 'RefreshGalopGrid';
       var ajaxManager = $find("<%=PageRadAjaxManager.ClientID%>");
       ajaxManager.ajaxRequest(arguments);
    }


    When calling my function, I get the following error :

    Uncaught TypeError: Cannot read property 'caller' of undefined 

    I use a RadAjaxManager in the same way in other pages and I don't get any problem. Does any one got a idea to solve this trouble ?

    Thanks,
    Corentin
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Jul 2014 in reply to Corentin Link to this post

    Hi Corentin,

    Please have a look into the sample code snippet which works fine at my end.

    ASPX:
    <telerik:RadAjaxManager ID="PageRadAjaxManager" runat="server" OnAjaxRequest="PageRadAjaxManager_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PageRadAjaxManager">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="GalopRadGrid" LoadingPanelID="PageRadAjaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="PageRadAjaxLoadingPanel" runat="server" Skin="Silk">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadButton ID="rbtnAjax" runat="server" Text="Ajax" AutoPostBack="false"
        OnClientClicked="DoRefreshGalopGrid">
    </telerik:RadButton>
    <telerik:RadGrid ID="GalopRadGrid" runat="server" DataSourceID="sqldsOrders">
    </telerik:RadGrid>
    <asp:SqlDataSource ID="sqldsOrders" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT top 10 [OrderID], [CustomerID] FROM [Orders]"></asp:SqlDataSource>

    JavaScript:
    function DoRefreshGalopGrid() {
        var ajaxManager = $find("<%=PageRadAjaxManager.ClientID%>");
        ajaxManager.ajaxRequest();
    }

    C#:
    protected void PageRadAjaxManager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        Thread.Sleep(1000);
        GalopRadGrid.Rebind();
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Corentin
    Corentin avatar
    6 posts
    Member since:
    Jul 2014

    Posted 25 Jul 2014 Link to this post

    I finally found what the issue was ...
    This javascript function doesn't work :
    function DoRefreshGalopGrid() {
       var arguments = "RefreshGalopGrid";  
       var ajaxManager = $find("<%= PageRadAjaxManager.ClientID %>");
       ajaxManager.ajaxRequest(arguments);
    }

    But this one does :
    function DoRefreshGalopGrid() {
       var args = "RefreshGalopGrid";  
       var ajaxManager = $find("<%= PageRadAjaxManager.ClientID %>");  
       ajaxManager.ajaxRequest(args);
    }


    The only difference is in the name of the first variable.


    Thanks Shinu for your reply.


  5. Cedric
    Cedric avatar
    1 posts
    Member since:
    Sep 2015

    Posted 08 Sep 2015 in reply to Corentin Link to this post

    So much thanks to you,

    something was broken with newest telerik version on our app, that was this 'arguments' overriding in an obscure js file allowing us to implement SCORM API.

    Luckily it was an old piece of code doing nothing usefull, therefore delete resolve the problem :) 

     

Back to Top