This is a migrated thread and some comments may be shown as answers.

Edit Forms and Popup RegisterScriptControl errors

1 Answer 42 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
mac asked on 10 Feb 2009, 07:43 PM
hi; I keep getting an error when trying to databind or rebind a radgrid. The scenario is
MainPage.aspx has two control pages , Applicants.ascx and ApplicantDetail.ascx. Applicants.ascx build a gridview and allows user to select. ApplicantDetails.ascx takes selectedValue and builds detail page.  If I don't call for databind then the grid loads one step behind. This will correct itself when I ask it to edit,delete or insert a new record and no error occurs. However if I databind as I have it written or anywhere else ie. Page_prerender, Page_load the following error comes up.
" Script Control 'RadTextBox1' is not a registered script control. Script controls must be registered using registerScriptControl() before callign RegisterScriptDescriptors(). Parameter name: ScriptControl() "

I do have the ApplicantDetailGrid wrapped in an ajaxpanel, but removing this did not make any difference. It seems to have everything to do with how I am databinding. thanks for any assistance.

MainPage code
Protected Sub Applicants1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Applicants1.PreRender  
        ApplicantDetail1.ApplicantID = Applicants1.SelectedGridItem 'The Detail page  
End Sub 

ApplicantDetail page code
Public Property ApplicantID() As String  
            Return lblAppID.Text  
        End Get  
        Set(ByVal value As String)  
            lblAppID.Text = value 
        End Set  
    End Property 

Applicant Detail Source
<asp:SqlDataSource ID="SqlDataSource1" runat="server"   
ConnectionString="<%$ ConnectionStrings:Conn %>" 
                DeleteCommand="DELETE FROM [ATS_Prescreen] WHERE [PreScreenID] = @PreScreenID"   
                InsertCommand="INSERT INTO..." 
                SelectCommand="SELECT * FROM [table] WHERE ([AppID] = @AppID)"   
                UpdateCommand="UPDATE table ... WHERE [PreScreenID] = @PreScreenID">  
                    <asp:ControlParameter ControlID="lblAppID" DefaultValue="xx" Name="AppID" PropertyName="Text" /> 
                <asp:Parameter Name="PreScreenID" Type="Int32" /> 
                <asp:ControlParameter ControlID="lblAppID" DefaultValue="xx" Name="AppID" PropertyName="Text" /> 
                    Insert Params..  
        <asp:Label ID="lblAppID" runat="server" Text="Label" Visible="False"></asp:Label> 

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 13 Feb 2009, 06:02 PM
Hi mac,

In general, this error occurs if you try to call RadGrid's RenderControl method before its Render event, or if you have a RadGrid within a container that populates itself during callback.

If this, however, doesn't get  you on the right track with fixing the run-time error, I'd suggest you to open a formal support ticket and send us a runnable example of your project to debug.

Hope this helps.

the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question