I've found what I think is a bug with the RadMenu control in the newest version of the RadControls (2011.3.1305). I had created a static RadMenu control (i.e. items defined at design time, using the smart tags) before the latest upgrade, and the generated code looked like this:
This worked fine before the upgrade, but after we upgraded to the newest version, I started getting the following error in the Chrome developer console on the page that contained the control:
The RadMenu still displayed, but the dropdown wouldn't work, and other RadControls that appeared later on the page didn't work, probably because the browser simply stopped loading scripts at that point. The fix was to comment out the
<
telerik:RadMenu
ID
=
"RadMenu2"
runat
=
"server"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
ImageUrl
=
"..."
Text
=
"..."
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
ImageUrl
=
"..."
Text
=
"..."
NavigateUrl
=
"..."
>
</
telerik:RadMenuItem
>
[... several more items ...]
</
Items
>
</
telerik:RadMenuItem
>
</
Items
>
<
WebServiceSettings
>
<
ODataSettings
InitialContainerName
=
""
>
</
ODataSettings
>
</
WebServiceSettings
>
</
telerik:RadMenu
>
This worked fine before the upgrade, but after we upgraded to the newest version, I started getting the following error in the Chrome developer console on the page that contained the control:
Uncaught TypeError: Cannot read property 'Name' of undefined
b.ODataBinderTree._buildNodeScriptResource.axd:27
b.ODataBinderTree._buildTreeScriptResource.axd:23
b.ODataBinderTreeScriptResource.axd:17
b.NavigationControlODataSettingsScriptResource.axd:7
a.RadMenu.set_webServiceSettingsScriptResource.axd:425
Sys$Component$_setPropertiesScriptResource.axd:3758
Sys$Component$createScriptResource.axd:3816
(anonymous function)http://[websitename]/:856
(anonymous function)ScriptResource.axd:3484
Sys$_Application$_raiseInitScriptResource.axd:5078
Sys$_Application$initializeScriptResource.axd:4928
initScriptResource.axd:5032
Sys$_Application$_domReady.document.addEventListener.check
The RadMenu still displayed, but the dropdown wouldn't work, and other RadControls that appeared later on the page didn't work, probably because the browser simply stopped loading scripts at that point. The fix was to comment out the
<
WebServiceSettings
>
tag, which made the error disappear and the functionality return to normal. Since it was a static menu anyway, the functioning of the menu wasn't affected. I figured I'd post this here to help others who might have the same problem, and it might also be something the developers would want to patch in a future version of the controls.