Exception On Sorting Based On CustomSummary

Syncfusion 5.1
VS 2005

I get this exception when trying to sort by custom summary(I do not get this exception when using the predefined summaries like DoubleAggregate). Using a custom summary(TotalSummary provided in the samples) and then sorting the groups based on this by setting SetGroupSummarySortOrder on the sortcolumndescriptor.

Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Grid.Grouping.GridTable.OnQueryCoveredRange(GridTableQueryCoveredRangeEventArgs e)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTable.RaiseQueryCoveredRange(GridQueryCoveredRangeEventArgs e)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableModel.OnQueryCoveredRange(GridQueryCoveredRangeEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModel.RaiseQueryCoveredRange(GridQueryCoveredRangeEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModelCoveredRanges._Find(Int32 rowIndex, Int32 colIndex, GridRangeInfo& range)
at Syncfusion.Windows.Forms.Grid.GridModelCoveredRanges.Find(Int32 rowIndex, Int32 colIndex, GridRangeInfo& range)
at Syncfusion.Windows.Forms.Grid.GridControlBase.ScrollCellInViewInt(Int32 rowIndex, Int32 colIndex, Boolean scrollFloatingCell, Boolean dontScroll, GridScrollCurrentCellReason reason)
at Syncfusion.Windows.Forms.Grid.GridControlBase.ScrollCellInView(Int32 rowIndex, Int32 colIndex, GridScrollCurrentCellReason reason)
at Syncfusion.Windows.Forms.Grid.GridCurrentCell.BeginEdit()
at Syncfusion.Windows.Forms.Grid.GridControlBase.FixCurrentCellGotFocus(Boolean noScroll)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.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)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)

1 Reply

HA haneefm Syncfusion Team August 10, 2007 06:29 PM UTC

Hi Shek,

Here is a minimal sample with a custom summary that shows you "How to sort summary using either GroupSortOrderComparer or SetGroupSummarySortOrder?". Please try the attached sample and let me know if this helps.
CustomSummarySortOrder.zip

Best regards,
Haneef

Loader.
Up arrow icon