GanttView unhandled exception

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

    • Post Options:
    • Link

    Posted 25 March 2021, 10:15 am EST - Updated 3 October 2022, 2:10 pm 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
                [b].ExtendLastCol = False[/b]
            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:

    System.ArgumentOutOfRangeException
      HResult=0x80131502
      Message=Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
      Source=mscorlib
      StackTrace:
       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]
    
    

  • Posted 25 March 2021, 5:41 pm EST

    Hi,

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

    [Internal Tracking ID: C1WIN-24616]

    Regards.

    Avnish

  • Posted 1 June 2021, 10:19 pm EST - Updated 3 October 2022, 2:10 pm EST

    Hi,

    The issue has been fixed in the latest 21v1 Hotfix update. Please update your controls to the latest version using the C1ControlPanel utility. Please refer to the attached GIF for steps.

    Regards.

    Avnish

Need extra support?

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

Learn More

Forum Channels