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

[Solved] NullReference exception at GetChildScriptDescriptorsRecursive

1 Answer 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Attila Gál
Top achievements
Rank 1
Attila Gál asked on 06 Nov 2009, 04:38 PM
Hi,

I'm using the RadGrid in WebUserControl EditMode, and I've dynamically added two dropdownlists (they are inherited extensions of the ASP dropdownlists) and one CascadingDropDown from the AjaxControlToolkit.
If I do this inside my edit user control, I get a NullReference exception, the stacktrace is here:
   at AjaxControlToolkit.ExtenderControlBase.GetScriptDescriptors(Control targetControl)
   at System.Web.UI.ExtenderControl.System.Web.UI.IExtenderControl.GetScriptDescriptors(Control targetControl)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetScriptDescriptors()
   at System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl)
   at System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl)
   at Telerik.Web.UI.ProxyScriptControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
[...]

The edit control works if I don't add the CascadingDropDown to the control tree, and everything works if I add it outside the grid.

What should I try?

Thanks,


   At.

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 11 Nov 2009, 03:52 PM
Hello Attila,

From the stack trace of the exception you get I suspect that the script descriptors of the AJAX toolkit extender are not initialized properly in this case. Can you please check whether adding the CascadingDropDown control to a hidden asp Panel (wrapped in MS UpdatePanel) and switching the visibility of this panel on ajax request produces the same result? This will help us determine whether the issue is RadGrid-specific or related to the ASP.NET AJAX framework.

If this scenario works properly, I will appreciate if you isolate a working subset of your project side by side with the depicted test case and send it enclosed to a regular support ticket. We will test/debug them locally and will get back to you with our findings.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Attila Gál
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or