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

LoadViewState

1 Answer 66 Views
Filter
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Feb 2011, 02:55 PM
Hello,

I have a page that inherits from compositecontrol and i am trying to load the filter the first time the page loads but i'm getting the following exception:

PS - i am able to load the filter on postback..

Object reference not set to an instance of an object. 
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.NullReferenceException: Object reference not set to an instance of an object.
  
Source Error: 
  
  
Line 537:                {
Line 538:                    ((IStateManager)myRadFilter.RootGroup).LoadViewState(DoFilterSerialize(new BL.GPSearchFilterBL(RequestParam.RequestParamIntValue("SID")).SearchFilter));
Line 539:                    myRadFilter.RecreateControl();
Line 540:
Line 541:                    myRadFilter.FireApplyCommand();
   
  
Source File: C:\Projectos\DotNetFramework35\FrameworkSolution\AmbiSIG.GeoPortal.Web.Map.TG\UI\WebControls\ResultsControl\ResultsControl.cs    Line: 539 
  
Stack Trace: 
  
  
[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.RadFilterDataFieldEditor.CreateEditorFrom(RadFilterDataFieldEditor baseEditor) +9
   Telerik.Web.UI.RadFilterDataFieldEditorCollection.RetrieveEditorForFieldName(String fieldName) +106
   Telerik.Web.UI.RadFilterSingleExpressionItem.SetupFunctionInterface(Control container) +55
   Telerik.Web.UI.RadFilterExpressionItem.CreateFunctionalInterface() +72
   Telerik.Web.UI.RadFilter.CreateFilterItems() +286
   Telerik.Web.UI.RadFilter.CreateControlHierarchy() +13
   Telerik.Web.UI.RadFilter.CreateChildControls() +87
   System.Web.UI.Control.EnsureChildControls() +87
   Telerik.Web.UI.RadFilter.get_RootGroupItem() +21
   Telerik.Web.UI.RadFilter.RecreateControl() +12
   AmbiSIG.GeoPortal.Web.Map.TG.UI.WebControls.ResultsControl.ResultsControl.DoOnLoad(EventArgs e) in C:\Projectos\DotNetFramework35\FrameworkSolution\AmbiSIG.GeoPortal.Web.Map.TG\UI\WebControls\ResultsControl\ResultsControl.cs:539
   AmbiSIG.GeoPortal.Web.UI.BaseCompositeControl.OnLoad(EventArgs e) in C:\Projectos\DotNetFramework35\FrameworkSolution\AmbiSIG.GeoPortal.Web\UI\BaseCompositeControl.cs:109
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
  
  

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 16 Feb 2011, 08:23 AM
Hello David,

Could you please provide some sample code I can use to build a runnable example that reproduces the issue?

Best wishes,
Martin
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.
Tags
Filter
Asked by
David
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or