Javascript Error when placed in RadGrid

2 posts, 0 answers
  1. Justin McMillen
    Justin McMillen avatar
    20 posts
    Member since:
    Aug 2009

    Posted 26 Jan 2011 Link to this post

    I get the following error when I place a RadListBox inside the edit template of a RadGrid and ajaxify them with the RadAjaxManagerProxy:

     Microsoft JScript runtime error: 'Telerik.Web.UI.RadListBox' is null or not an object

    Here's a sample of code
    <telerik:RadAjaxManagerProxy ID="RadAjaxProxy1" runat="server">
            <telerik:AjaxSetting AjaxControlID="updatePanel">           
                    <telerik:AjaxUpdatedControl ControlID="updatePanel"
                           LoadingPanelID="RadAjaxLoadingPanel2" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />          
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Default" />
    <asp:Panel ID="updatePanel" runat="server">
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="myDataSource" AllowAutomaticInserts="false"
         AllowAutomaticUpdates="false" AllowPaging="true" PageSize="50"
         AllowAutomaticDeletes="true" onitemcommand="RadGrid1_ItemCommand"
            <MasterTableView AutoGenerateColumns="False" DataSourceID="myDataSource"
            HeaderStyle-HorizontalAlign="Center" CommandItemDisplay="Top">
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="Edit" />
                    <telerik:GridBoundColumn DataField="Field1" HeaderText="Field1"
                        ItemStyle-HorizontalAlign="Center" ReadOnly="true" >
                <EditFormSettings EditFormType="Template">
                  <asp:TextBox ID="txtField1" runat="server" Text='<%# Bind("Field1") %>' />
                  <td valign="top">                                   
                 <telerik:RadListBox ID="lstBox1" runat="server"
                                 DataTextField="TextField" DataValueField="ValueField" Height="200px" Width="400px"
                  CheckBoxes="true" />                                
                    <div class="commandLinksDiv">
                     <asp:LinkButton ID="lnkBtnUpdate" runat="server"
        CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                     CssClass="commandLinks" ValidationGroup="vldEditForm">
                        <img src="../../Styles/images/Update.gif" alt="" />
                          <span><%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %></span>
                     <asp:LinkButton ID="lnkBtnCancel" runat="server" CausesValidation="false"
                         CommandName="Cancel" CssClass="commandLinks" Text="Cancel">
                      <img src="../../Styles/images/Cancel.gif" alt="" />
                    <EditColumn ButtonType="ImageButton" CancelText="Cancel" InsertText="Insert"
                        UniqueName="EditCommandColumn1" UpdateText="Update">

    I get the error when I am debugging from Visual Studio and go into edit or insert mode.  Has anyone had this problem or know how to fix it?
  2. Helen
    Helen avatar
    1052 posts

    Posted 31 Jan 2011 Link to this post


    We tried to reproduce the problem you described, but without much success. Please see our test project attached.
    What is the difference in your case? Could you modify our project so that we can observe the error?

    Kind regards,
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. DevCraft R3 2016 release webinar banner
Back to Top