1
Answer

Unexplained Error on Grouping

Alex Hayward

Alex Hayward

15y
5.6k
1
I am applying a grouping on a GanttTable using the method SetRowGroup, when I apply the group this error occurs,

Exception Occured : System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.
Parameter name: value
   at System.DateTime.Subtract(TimeSpan value)
   at ILOG.Views.Gantt.Windows.Forms.GanttSheet.PaintLicenseDecoration(Graphics g)
   at ILOG.Views.Gantt.Windows.Forms.GanttSheet.PaintGrids(Graphics g, Boolean showOnTop)
   at ILOG.Views.Gantt.Windows.Forms.GanttSheet.OnPaint(PaintEventArgs pe)
   at ILOG.Views.Gantt.Windows.Forms.ActivitySheet.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at ILOG.Views.Gantt.Windows.Forms.TimeControl.WndProc(Message& m)
   at ILOG.Views.Gantt.Windows.Forms.GanttSheet.WndProc(Message& m)
   at ILOG.Views.Gantt.Windows.Forms.ActivitySheet.WndProc(Message& m)
   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.SafeNA first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
ativeMethods.UpdateWindow(HandleRef hWnd)
   at System.Windows.Forms.Control.Update()
   at ILOG.Views.Gantt.Windows.Forms.GanttSheet.VerticalScrollTo(Int32 value, Boolean blit)
   at ILOG.Views.Gantt.Windows.Forms.GanttSheet.set_FirstVisibleRow(Int32 value)
   at ILOG.Views.Gantt.Windows.Forms.GanttSheet.RowControllerChanged(Object sender, RowControllerChangeEventArgs e)
   at ILOG.Views.Windows.Forms.RowControllerChangeEventHandler.Invoke(Object sender, RowControllerChangeEventArgs e)
   at ILOG.Views.Windows.Forms.TreeTable.OnRowControllerChanged(RowControllerChangeEventArgs e)
   at ILOG.Views.Gantt.Windows.Forms.GanttTable.OnRowControllerChanged(RowControllerChangeEventArgs e)
   at ILOG.Views.Windows.Forms.TreeTable.ScrollTo(Int32 x, Int32 y)
   at ILOG.Views.Windows.Forms.TreeTable.VerticalScrollTo(Int32 value)
   at ILOG.Views.Windows.Forms.TreeTable.set_FirstVisibleRow(Int32 value)
   at ILOG.Views.Windows.Forms.TreeTable.RefreshNode(Object node)
   at ILOG.Views.Windows.Forms.TreeTable.NodesReset(TreeModelChangeEventArgs e)
   at ILOG.Views.Windows.Forms.TreeTable.TreeChanged(Object sender, TreeModelChangeEventArgs e)
   at ILOG.Views.Windows.Forms.TreeModelView.OnTreeModelChanged(TreeModelChangeEventArgs e)
   at ILOG.Views.Windows.Forms.TreeModelView.InvalidateView(Boolean forceMapping)
   at ILOG.Views.Windows.Forms.TreeModelView.set_RowGroup(IRowGroup value)
   at ILOG.Views.Gantt.Windows.Forms.GanttTable.SetRowGroup(IRowGroup group)
   at Monitor.mPlan.Main.MainPanel.GroupBy(IRowGroup group) in C:\Users\alex.hayward\Documents\Visual Studio 2008\Projects\mPlan.sln\mPlanInitialDesign\Main\MainPanel.cs:line 379
GetTotals ActivityNo, , string

I have debugged all of the code we have, and our code is not falling over, this error seems to appear out of nowhere, any pointers?
Answers (1)