I am getting the good old {"Object reference not set to an instance of an object."}
I attached the stack trace at the end of this message.
It started after I added summary row to the grouping
the grouping and the summary are working greate - but after few seconds to a minute I am getting the exception (even if the bound data is not changing)
Is there a way to debug it and figure out why it happens?or which row cause the problem?
Any other idea?
Thanks!!!
this.sfDataGrid1.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = "Type" });
// Creates the GridSummaryRow.
GridSummaryRow captionSummaryRow = new GridSummaryRow();
captionSummaryRow.Name = "CaptionSummary";
captionSummaryRow.ShowSummaryInRow = false;
captionSummaryRow.TitleColumnCount = 1;
captionSummaryRow.Title = "{Key} ({ItemsCount})";
// Creates the GridSummaryColumn1.
GridSummaryColumn summaryColumn1 = new GridSummaryColumn();
summaryColumn1.Name = "TotalActualPower";
summaryColumn1.Format = "{Sum}";
summaryColumn1.MappingName = "ActualPower";
summaryColumn1.SummaryType = SummaryType.Int32Aggregate;
// Adds the summary column in the SummaryColumns collection.
captionSummaryRow.SummaryColumns.Add(summaryColumn1);
// Initializes the caption summary row.
this.sfDataGrid1.CaptionSummaryRow = captionSummaryRow;
this.sfDataGrid1.Style.CaptionSummaryRowStyle.BackColor = Color.LightSkyBlue;
this.sfDataGrid1.Style.CaptionSummaryRowStyle.Font = new GridFontInfo(new Font("Arial", 10f, FontStyle.Bold));
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
at Syncfusion.Data.SummaryCreator.<>c__DisplayClass2.b__0(ISummaryColumn col)
at Syncfusion.Data.Extensions.FunctionalExtensions.ForEach[T](IEnumerable`1 items, Action`1 action)
at Syncfusion.Data.SummaryCreator.GetSummaryDisplayTextForRow(SummaryRecordEntry summaryEntry, ICollectionViewAdv collectionView, String columnHeaderName)
at Syncfusion.WinForms.DataGrid.GridPainter.GetCaptionSummaryCellValue(DataRowBase dataRow, GridColumn column)
at Syncfusion.WinForms.DataGrid.GridPainter.GetCellValue(DataRowBase dataRow, GridColumn column)
at Syncfusion.WinForms.DataGrid.GridPainter.DrawSpannedDataColumn(DataRowBase dataRow, DataColumnBase column, VisibleLineInfo line, Graphics graphics, Rectangle finalSize, Int32& width)
at Syncfusion.WinForms.DataGrid.GridPainter.DrawCaptionSummaryRow(DataRowBase dataRow, Rectangle finalSize, Graphics graphics, IEnumerable`1 visibleColumns)
at Syncfusion.WinForms.DataGrid.GridPainter.DrawCaptionSummaryRow(Graphics graphics, DataRowBase dataRow, Rectangle finalSize)
at Syncfusion.WinForms.DataGrid.GridPainter.DrawRow(DataRowBase dataRow, Rectangle finalSize, Graphics graphics)
at Syncfusion.WinForms.DataGrid.GridPainter.DrawRows(Graphics graphics)
at Syncfusion.WinForms.DataGrid.GridPainter.OnPaint(PaintEventArgs e, Size clientSize)
at Syncfusion.WinForms.DataGrid.TableControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.WinForms.Controls.SfScrollControl.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)