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

Issue with Chrome and a RadAjaxManager

4 Answers 414 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Corentin
Top achievements
Rank 1
Corentin asked on 24 Jul 2014, 10:28 AM
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

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Jul 2014, 08:51 AM
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.
0
Corentin
Top achievements
Rank 1
answered on 25 Jul 2014, 10:27 AM
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.


0
Cedric
Top achievements
Rank 1
answered on 08 Sep 2015, 12:49 PM

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 :) 

 

0
Tounsi
Top achievements
Rank 1
answered on 26 Feb 2018, 02:53 PM
<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>
Tags
Ajax
Asked by
Corentin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Corentin
Top achievements
Rank 1
Cedric
Top achievements
Rank 1
Tounsi
Top achievements
Rank 1
Share this question
or