Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RadAjaxManager AjaxRequest TypeError: Cannot read property 'id' of undefined

Here's the situation:
I have a host page that loads a custom web user control. In my web control I want use javascript and a RadAjaxManager to load up a second web user control. I used this example from Telerik as my guide:
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/clientsideapi/defaultvb.aspx

However, I kept getting the following error when I would call the client-side "ajaxRequest" method on the RadAjaxManager.

TypeError: Cannot read property 'id' of undefined
like image 611
Airn5475 Avatar asked Dec 06 '12 16:12

Airn5475


2 Answers

Another reason this error can happen is not having clientIDMode="AutoID" attribute in the <pages> element of your web.config

like image 96
Brian Ogden Avatar answered Sep 28 '22 15:09

Brian Ogden


I finally figured it out!
On my parent web control I already had implemented a RadAjaxManager. So when I loaded up my second web control with its own RadAjaxManager, the javascript was getting confused as to which manager to use.

Enter: RadAjaxManagerProxy -> http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html

After implementing this, my controls worked beautifully!

Hope this helps others, if not myself later down the road when I forget.

like image 28
Airn5475 Avatar answered Sep 28 '22 15:09

Airn5475