+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / RabComboBox Object reference not set, using Master page

RabComboBox Object reference not set, using Master page

5 posts, 0 answered
  1. Jefferson
    Jefferson avatar
    3 posts
    Registered:
    21 Jul 2010
    22 Jul 2010
    Link to this post
    Hi,

    I am having a problem regarding the RadComboBox, everything is working fine unless I include an Ajax Master Page on it. It returns an error of "Object reference not set to an instance of an object".
    Here is the sample code of my project.
    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="TestMasterPage.master.cs" Inherits="TestMasterPage" %>
    <%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
    <!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>
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>
        </form>
    </body>
    </html>
    and for the content
    <%@ Page Language="C#" MasterPageFile="~/TestMasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
     
    <%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
     
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <telerik:RadComboBox ID="RadComboBox1" runat="server"
                EnableAutomaticLoadOnDemand="True" EnableVirtualScrolling="True"
                ItemsPerRequest="10" ShowMoreResultsBox="True"
                    DataSourceID="EntityDataSource1" DataTextField="Name"
                    DataValueField="ID">
                </telerik:RadComboBox>
                <asp:EntityDataSource ID="EntityDataSource1" runat="server"
                    ConnectionString="name=EntityConnection" DefaultContainerName="EntityName"
                    EntitySetName="Sample" Select="it.[ID], it.[Name]">
                </asp:EntityDataSource>
    </asp:Content>
    I haven't place anything at the code behind on both page.

    Need your help asap.

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Jul 2010
    Link to this post
    Hello Jefferson,

    There is an object that is null. Is there any stack you could share?

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Jefferson
    Jefferson avatar
    3 posts
    Registered:
    21 Jul 2010
    23 Jul 2010
    Link to this post
    Sorry I cannot give you any stack for it doesn't show any on the page, however I could share you some screenshot of the pop-up error together with comparison using master page and not. They are both using the same data source and no other object is inserted.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    28 Jul 2010
    Link to this post
    Hi Jefferson,

    Remove EnableAutomaticLoadOnDemand="True" and you will not experience the issue. This is a bug in RadComboBox control which has been fixed for Q2 release of RadControls for ASP.NET AJAX.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Jefferson
    Jefferson avatar
    3 posts
    Registered:
    21 Jul 2010
    29 Jul 2010
    Link to this post
    Okay thanks...
Register for webinar
5 posts, 0 answered