I was moving from the latest (2-3 weeks old) trial to 2011.3.1305.40 build of the ASP.NET Ajax components, when I startet getting the following error message:
Microsoft JScript runtime error: Unable to get value of the property 'Name': object is null or undefined
After getting this, you start receiving all kind of JS errors, formatting errors in the RadGrid, etc. I spend a few hrs debugging it, when I eventually figured out it is something to do with the empty ODataSettings tag, which you get when working with the designer. I started removing the components from the page so I can figure out which one is breaking the runtime, turned out it is the RadComboBox. Below is the source of a page which will break 10 out of 10 times - tought I save someone else some time figuring it out.
Removing the following will fix it:
Thx,
Branimir
Branimir Giurov
C# MVP
Microsoft JScript runtime error: Unable to get value of the property 'Name': object is null or undefined
After getting this, you start receiving all kind of JS errors, formatting errors in the RadGrid, etc. I spend a few hrs debugging it, when I eventually figured out it is something to do with the empty ODataSettings tag, which you get when working with the designer. I started removing the components from the page so I can figure out which one is breaking the runtime, turned out it is the RadComboBox. Below is the source of a page which will break 10 out of 10 times - tought I save someone else some time figuring it out.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
div
>
<
telerik:RadComboBox
ID
=
"rcbSites"
runat
=
"server"
DropDownWidth
=
"200px"
MaxHeight
=
"300px"
Sort
=
"Ascending"
Width
=
"200px"
>
<
Items
>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Athens"
Value
=
"Athens"
Owner
=
"rcbSites"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Beijing"
Value
=
"Beijing"
Owner
=
"rcbSites"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Belgrade"
Value
=
"Belgrade"
Owner
=
"rcbSites"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Bristol"
Value
=
"Bristol"
Owner
=
"rcbSites"
/>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
"Copenhagen"
Value
=
"Copenhagen"
Owner
=
"rcbSites"
/>
</
Items
>
<
WebServiceSettings
>
<
ODataSettings
InitialContainerName
=
""
>
</
ODataSettings
>
</
WebServiceSettings
>
</
telerik:RadComboBox
>
</
div
>
</
form
>
</
body
>
</
html
>
Removing the following will fix it:
<
WebServiceSettings
>
<
ODataSettings
InitialContainerName
=
""
>
</
ODataSettings
>
</
WebServiceSettings
>
Thx,
Branimir
Branimir Giurov
C# MVP