Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ComboBox > RadComboBox with empty ODataSettings throws "Microsoft JScript runtime error: Unable to get value of the property 'Name': object is null or undefined" - 2011.3.1305.40 build of ASP.NET AJAX components

Not answered RadComboBox with empty ODataSettings throws "Microsoft JScript runtime error: Unable to get value of the property 'Name': object is null or undefined" - 2011.3.1305.40 build of ASP.NET AJAX components

Feed from this thread
  • Branimir Giurov avatar

    Posted on Feb 8, 2012 (permalink)

    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.

    <%@ 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">
    <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

    Reply

  • Genady Sergeev Genady Sergeev admin's avatar

    Posted on Feb 8, 2012 (permalink)

    Hello Branimir,

    This is a known issue with all web-service enabled controls. The problem is that if items are added to the combo trough design time, redundant ODataSettings section is applied to the combo box. Since its settings are empty, the combo is unable to initialize the web-service loader properly and throws an error. We will fix that for the upcoming release, meanwhile you can simply remove the ODataBinding section. More info can be found here.

    I hope that this helps.

    Greetings,
    Genady Sergeev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ComboBox > RadComboBox with empty ODataSettings throws "Microsoft JScript runtime error: Unable to get value of the property 'Name': object is null or undefined" - 2011.3.1305.40 build of ASP.NET AJAX components
Related resources for "RadComboBox with empty ODataSettings throws "Microsoft JScript runtime error: Unable to get value of the property 'Name': object is null or undefined" - 2011.3.1305.40 build of ASP.NET AJAX components"

ASP.NET ComboBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]