Thursday, August 8, 2013

Telerik RadAjaxManager object return null on subsequent request




PageAjaxManager in second request .

It work well with first ajax request but in second request  $find("<%= PageAjaxManager.ClientID %>") return null.

This problem occurs in browsers other than IE. In IE all ajax request are fired successfully.

Then set the EnablePageHeadUpdate property of PageAjaxManager as below and it will solve that issue. 


<telerik:RadAjaxManager ID="PageAjaxManager" runat="server" OnAjaxRequest="AjaxManager1_AjaxRequest" EnablePageHeadUpdate="false" EnableAJAX="True" UpdatePanelsRenderMode="Inline" >

OR

Faced the same problem with Chrome and Firefox (works in IE).
The $find("radAjaxManager") works sometimes for the first event, but returns null on subsequent events.
The fix is to fallback to DOM if $find fails:


var ajaxManager = $find("<%=radAjaxManager.ClientID%>");
if(!ajaxManager) ajaxManager = window.<%=radAjaxManager.ClientID%>;
ajaxManager.ajaxRequestWithTarget("<%=myControl.UniqueID %>", "");




0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More