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

Add Grid at runtime and use drag and drop feature.

1 Answer 118 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raman
Top achievements
Rank 1
Raman asked on 31 Dec 2011, 08:22 AM
Sir;

I am using telerik grid control. and i want to add grid on click of button. and then drag and drop rows from other grid controls on page to dynamically created grid control.

whenever i add grid dynamically and try to drag and drop i got this error.
Can u please suggest why this problem is coming.

Thanks and regards
raman singla

Script controls may not be registered after PreRender.

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.InvalidOperationException: Script controls may not be registered after PreRender.

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:

[InvalidOperationException: Script controls may not be registered after PreRender.]
   System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +432555
   System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +92
   Telerik.Web.UI.RadCompositeDataBoundControl.RegisterScriptControl() +72
   Telerik.Web.UI.RadCompositeDataBoundControl.ControlPreRender() +33
   Telerik.Web.UI.RadGrid.ControlPreRender() +118
   Telerik.Web.UI.RadCompositeDataBoundControl.OnPreRender(EventArgs e) +47
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 03 Jan 2012, 05:27 PM
Hеllo,

Please make sure that you create the grid according to the Programmatic Creation help topic.

If the issue persists, please open a formal support ticket and send us a small working project, demonstrating your full setup and showing the unwanted behavior.
We will debug it locally and get back to you with our findings.

All the best,
Mira
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Raman
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or