GanttView unhandled exception

Posted by: john.morrelles on 25 March 2021, 10:15 am EST

  • Posted 25 March 2021, 10:15 am EST

    I've added the following code to the HowToDoItInCode GanttView sample project:

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim GanttGrid As C1.Win.C1FlexGrid.C1FlexGrid

    GanttGrid = gv.Controls(2)
    With GanttGrid
    .AllowDragging = False
    .AllowDelete = False
    .AllowDragging = False
    .AllowFiltering = False
    .AllowFreezing = False
    .AllowSorting = False
    .AutoResize = True
    .ExtendLastCol = False
    End With
    End Sub

    When I click on the space between the last column in the grid and the splitter, I get the following error:

    Message=Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    at System.Collections.ArrayList.get_Item(Int32 index)
    at C1.Win.C1FlexGrid.ColumnCollection.get_Item(Int32 index)
    at C1.Win.C1GanttView.GridView.a(Int32 A_0, TaskProperty A_1)
    at C1.Win.C1GanttView.GridView.a(Int32 A_0, BaseTask A_1)
    at C1.Win.C1GanttView.GridView.a(MouseEventArgs A_0)
    at C1.Win.C1GanttView.GridView.OnMouseDown(MouseEventArgs e)
    at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.WndProc(Message& m)
    at C1.Win.C1FlexGrid.C1FlexGridBase.WndProc(Message& m)
    at C1.Win.C1GanttView.GridView.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.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr 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 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
    at HowToDoItInCode.My.MyApplication.Main(String[] Args) in :line 81

    This exception was originally thrown at this call stack:
    [External Code]

  • Replied 25 March 2021, 5:41 pm EST


    We have escalated this issue to the development team and will let you know when we have an update.

    [Internal Tracking ID: C1WIN-24616]

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels