I have a WebHiearchalDataGrid that has a grouping applied to it, when i try to get a row summary using the on screen supplied functions if a null reference exception. i am trying to figure out what could be causing this. I have pasted the Stack Trace below
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.Web.UI.GridControls.SummaryRow.GetSummaryValue(GridField field, Summary summary, ColumnSummaryInfo colSumInfo, SummaryRowSetting sumRowSetting, Boolean raiseEvnt) +510 Infragistics.Web.UI.GridControls.SummaryRow.BehaviorEvents_PreRender(Object sender) +911 Infragistics.Web.UI.GridControls.PreRenderHandler.Invoke(Object sender) +0 Infragistics.Web.UI.GridControls.GridBehaviorEvents.OnPreRender() +22 Infragistics.Web.UI.GridControls.GridBot.HandlePreRender() +65 Infragistics.Web.UI.GridControls.ContainerGridBot.HandlePreRender() +332 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.OnPreRender(EventArgs e) +1435 Infragistics.Web.UI.GridControls.WebDataGrid.OnPreRender(EventArgs e) +13 Infragistics.Web.UI.GridControls.ContainerGrid.OnPreRender(EventArgs e) +36 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.Control.PreRenderRecursiveInternal() +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
am using infragistics version 10.3.20103.2217, and a hierarchial grid. There are three bands and summary column on the third hierarchy. My application needs expanding and collapsing the complete grid and so I have given two buttons to do the same in UI.
when page is loaded, I expand using the exposed function ExpandAll().
If a user clicks to collapse, I use the function CollapseAll(),
but then if user tries to expand again, there is a null reference exception.
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:
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:
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.Web.UI.GridControls.SummaryRow.GetSummaryValue(GridField field, Summary summary, ColumnSummaryInfo colSumInfo, SummaryRowSetting sumRowSetting, Boolean raiseEvnt) +366 Infragistics.Web.UI.GridControls.SummaryRow.BehaviorEvents_PreRender(Object sender) +898 Infragistics.Web.UI.GridControls.PreRenderHandler.Invoke(Object sender) +0 Infragistics.Web.UI.GridControls.GridBehaviorEvents.OnPreRender() +74 Infragistics.Web.UI.GridControls.GridBot.HandlePreRender() +67 Infragistics.Web.UI.GridControls.ContainerGridBot.HandlePreRender() +332 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.OnPreRender(EventArgs e) +1956 Infragistics.Web.UI.GridControls.WebDataGrid.OnPreRender(EventArgs e) +37 System.Web.UI.Control.PreRenderRecursiveInternal() +80 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
Hello whanes,
If you have any questions please feel free to contact me.
Hi whanes,
I was not able to reproduce the issue. However, I created a small sample, replicating your scenario. Please refer to the attached sample and confirm if you are experiencing the same behavior. I used NetAdvantage 11.2.20112.2055.
Please let me know if this helps.
I am running v11.2, I downloaded from you guys about a week ago so I assume it is the latest release.
I am not sure what you mean about Parent or Child, but there is only a single band in the grid, however i do Group it pro grammatically first.
As far as a code sample
It goes like so
// Sample Start
grdResults.DataSource = GetDataSet();
grdResults.DataBind();
grdResults.GroupingSettings.GroupedColumns.Add("OrderNumber");
// Sample End
Then on the grid I click the summary button and select Sum, I get the error stated above.
What version are you running? Do you have the latest service release? Are you adding a summary in a parent or child? If you could attach a small sample that reproduces this issue, it would be awesome.
regards,David Young