Script control 'grdActions' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

7 posts, 0 answers
  1. bharat kumar
    bharat kumar avatar
    53 posts
    Member since:
    Jan 2010

    Posted 15 Mar 2011 Link to this post


    Hi,

    i am getting above error whenever i am clicking on modify button on page.
    the page is loaded properly in view mode but when click on modify button getting this error.
    i also trying to set RegisterWithScriptManager to false but not works.

    Script control 'grdActions' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

    Server Error in '/EpssWeb' Application.

    Script control 'grdActions' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
    Parameter name: scriptControl

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Script control 'grdActions' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
    Parameter name: scriptControl

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentException: Script control 'grdActions' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
    Parameter name: scriptControl]
       System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +349918
       System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +21
       Telerik.Web.UI.RadCompositeDataBoundControl.RegisterScriptDescriptors() +66
       Telerik.Web.UI.RadCompositeDataBoundControl.RenderContents(HtmlTextWriter writer) +64
       Telerik.Web.UI.RadGrid.RenderContents(HtmlTextWriter writer) +94
       Telerik.Web.UI.GridBaseDataList.Render(HtmlTextWriter writer) +120
       Telerik.Web.UI.RadGrid.Render(HtmlTextWriter writer) +199
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       Telerik.Web.UI.ControlRenderer.Render(HtmlTextWriter writer) +145
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.Control.Render(HtmlTextWriter writer) +10
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +234
       System.Web.UI.Control.Render(HtmlTextWriter writer) +10
       System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +34
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +188
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
       Telerik.Web.UI.RadWebControl.RenderContents(HtmlTextWriter writer) +36
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
       Telerik.Web.UI.RadWebControl.Render(HtmlTextWriter writer) +92
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.WebControls.TableCell.RenderContents(HtmlTextWriter writer) +57
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.WebControls.Table.RenderContents(HtmlTextWriter writer) +206
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
       System.Web.UI.WebControls.FormView.Render(HtmlTextWriter writer) +60
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.Control.Render(HtmlTextWriter writer) +10
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.Control.Render(HtmlTextWriter writer) +10
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.Control.Render(HtmlTextWriter writer) +10
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.Page.Render(HtmlTextWriter writer) +29
       System.Web.UI.Adapters.ControlAdapter.Render(HtmlTextWriter writer) +21
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +8685193
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +693
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
       System.Web.UI.Page.Render(HtmlTextWriter writer) +29
       System.Web.UI.Adapters.ControlAdapter.Render(HtmlTextWriter writer) +21
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +8685193
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618 



    Please help.
    its urgent and error coming on Production server also.

    waiting for your reply


    Hi...

    Please reply....
    i am waiting for the solution...


  2. Francesco
    Francesco avatar
    15 posts
    Member since:
    Jul 2011

    Posted 27 Jul 2011 Link to this post

    Hello,

    I'm getting the same javascript error while integrating a RadGrid in RadScheduler.

    I followed the advanced form customization guide (because my advanced form is more complex). I defined a custom user control in which there is a RadTabStrip with 3 tabs and inside one of them I integrated a RadGrid, with paging, sorting and filtering. The RadScheduler is defined in a user control that is the content of a masterpage, and it's ajaxified using RadAjaxManager (declared into masterpage but set using the Proxy inside the usercontrol). It is databound to a collection filled from a database, as well as the the DataTable bound to RadGrid.

    Here is some excerpt from Master and content page to show Ajax, ScriptManager and RadScheduler settings:

    Masterpage:
    ...
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager2" runat="server">
            <Scripts>
                <asp:ScriptReference Path="AdvancedForm.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
        ...
        <asp:ContentPlaceHolder ID="PlaceHolder" runat="server" />
        ...
        </form>
    </body>

    Content page:
    ...
    <asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolder" runat="server">
        <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
        ....
       <telerik:RadScheduler ID="RadScheduler1" runat="server" ... >
                    <AdvancedForm Modal="true" />
                    <AppointmentTemplate>
                        ...
                    </AppointmentTemplate>
                    <InlineInsertTemplate>
                        <scheduler:InlineInsertForm runat="server" ID="InlineInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'... />
                    </InlineInsertTemplate>
                    <AdvancedInsertTemplate>
                        <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>' ...  />
                    </AdvancedInsertTemplate>
                    <AdvancedForm EnableCustomAttributeEditing="True" />
                    <AdvancedEditTemplate>
                        <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>' ...  />
                    </AdvancedEditTemplate>
       </telerik:RadScheduler>
    </asp:Content>


    Since every action which triggers a postback (in this case, sorting, changing page and filtering) causes the loss of the state of the advanced form (every field becomes empty), I wrapped the RadGrid in a RadAjaxPanel. Now any of that action gives me the javascript error "Script control 'rfltMenu' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors()." and if I remove filtering support, it gives me the same error on another grid component and so on.

    I read that the RegisterWithScriptManager attribute was introduced to handle these errors, I've set it to false and called the RegisterScriptControl() passing the RadGrid instance in the OnPreRender method of the AdvancedForm usercontrol, but to no avail.

    Here is some excerpt from the usercontrol:

    Excerpt from AdvancedForm.aspx:
    <telerik:RadAjaxPanel ID="contactsRefreshPanel" runat="server">
        <telerik:RadGrid AutoGenerateColumns="false" ID="ContactsGrid"
            OnNeedDataSource="ContactsGrid_NeedDataSource"
            AllowSorting="True" AllowFilteringByColumn="true"
            AllowPaging="True" PageSize="2"
            RegisterWithScriptManager="false"
            runat="server">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView AutoGenerateColumns="false" TableLayout="Auto">
                <Columns>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Nome" SortExpression="Name"
                        UniqueName="Name" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Surname" HeaderText="Cognome" SortExpression="Surname"
                        UniqueName="Surname" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Company" HeaderText="Azienda" SortExpression="Company"
                        UniqueName="Company" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Email" HeaderText="Email" SortExpression="Email"
                        UniqueName="Email" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CellularPhone" HeaderText="Cellulare" SortExpression="CellularPhone"
                        UniqueName="CellularPhone" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>

    Excerpt from AdvancedForm.cs:
    public partial class AdvancedForm : System.Web.UI.UserControl
        {
            ...
            protected void Page_Load(object sender, EventArgs e)
            {
                UpdateButton.ValidationGroup = Owner.ValidationGroup;
                UpdateButton.CommandName = Mode == AdvancedFormMode.Edit ? "Update" : "Insert";
     
                InitializeStrings();
                InitializeRecurrenceEditor();
               
                // A series of client scripts registered
                 
            }
            ...
            protected void ContactsGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
            {
                ContactsGrid.DataSource = Default.GetDataTable("SELECT * FROM Contacts");
            }
            ...
            protected override void OnPreRender(EventArgs e)
            {
                base.OnPreRender(e);
     
                if (!FormInitialized)
                {
                    FormInitialized = true;
                }
     
                if (!this.DesignMode)
                {
                    // Test for ScriptManager and register if it exists
                    ScriptManager sm = ScriptManager.GetCurrent(Page);
     
                    if (sm == null)
                        throw new HttpException("A ScriptManager control must exist on the current page.");
     
                    sm.RegisterScriptControl(ContactsGrid);
                }
            }
            ...
        }

    Perhaps there something in the Ajax settings which isn't correct? I tried many things, including using RadAjaxManagerProxy to ajaxify the grid only but without results.
    Any other suggestion is welcome. I'm stuck on this problem for 2 days.

    By the way, I'm using RadControls Q1 2011 SP2.

    Thanks in advance!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Francesco
    Francesco avatar
    15 posts
    Member since:
    Jul 2011

    Posted 28 Jul 2011 Link to this post

    No one has any advice on what could be the cause of the error, or something to try to find it out?
    I'm stuck here and I need to deliver this part of the software next week, so I'm a little strict on time...

    Thank you!
  5. Francesco
    Francesco avatar
    15 posts
    Member since:
    Jul 2011
  6. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 01 Aug 2011 Link to this post

    Hello Francesco,

    I checked your account and it occurs that you have opened several forum threads for the same thing. It is highly recommended that you keep related questions in one forum post, so that we can easily keep track of your support history and provide better answers in a shorter time.

    Additionally, I will suggest you to keep the communication in the other ticket in order to avoid duplicate posts.

    Regards,
    Pavlina
    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.

  7. Manuel
    Manuel avatar
    1 posts
    Member since:
    Apr 2009

    Posted 01 Aug 2011 Link to this post

    Hello Pavlina.
    Sorry for the inconvenience. We'll keep the discussion on the other thread from now on. if necessary.
    We also created a support ticket for that issue.

    Regards,
    Eva
  8. Dan Lehmann
    Dan Lehmann avatar
    103 posts
    Member since:
    May 2011

    Posted 26 Aug 2011 Link to this post

    Hi Pavlina,
    I cannot find the other thread. Can you please provide a link? I am having the same error with a Custom Advanced form and a User Control I placed on the form.

    nm, here is the link: http://www.telerik.com/community/forums/aspnet-ajax/scheduler/radgrid-inside-scheduler-advanced-edit-insert-form.aspx

    Thanks,
    Dan
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017