Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
745
Problem loading a webhierarchicaldatagrid with a dataset containing 0 rows
posted

Hi,

I'm using infragistics 11.2. I have a webhierarchicaldatagrid with 3 levels.
I have a dataset with 3 tables, each one for each level.
If the dataset tables have at least one row, everything works just fine. The webhierarchicaldatagrid  is loaded with success, for the parent level and also for the bands.

But if I have 0 rows in all tables of the dataset, when I try to assing the dataset to the webhierarchicaldatagrid  datasource I get this error:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Infragistics.Web.UI.GridControls.JsTypeResolver.ResolveTypeId(Type type)
   at Infragistics.Web.UI.GridControls.GridField.SaveClientProperties()
   at Infragistics.Web.UI.GridControls.FormattedGridField.SaveClientProperties()
   at Infragistics.Web.UI.GridControls.BoundDataField.SaveClientProperties()
   at Infragistics.Web.UI.Framework.ObjectBase.Infragistics.Web.UI.IClientState.SaveClientProperties()
   at Infragistics.Web.UI.Framework.ObjectBase.SaveObjectClientProperties(IClientState webObject, StringBuilder builder)
   at Infragistics.Web.UI.Framework.ObjectBase.WriteClientCollections(StringBuilder builder, ArrayList collections)
   at Infragistics.Web.UI.Framework.ObjectBase.SaveCollectionsStateToViewState()
   at Infragistics.Web.UI.Framework.RunBot.HandleSaveViewState()
   at Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.SaveViewState()
   at Infragistics.Web.UI.GridControls.BaseGrid.SaveViewState()
   at Infragistics.Web.UI.GridControls.WebDataGrid.SaveViewState()
   at Infragistics.Web.UI.GridControls.ContainerGrid.SaveViewState()
   at Infragistics.Web.UI.GridControls.ContainerGrid.System.Web.UI.IStateManager.SaveViewState()
   at Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid.SaveViewState()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Control.SaveViewStateRecursive()
   at System.Web.UI.Page.SaveAllState()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.empresarial_leadform_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Can anybody help me?

Thank you