I have 3 textboxes which is where I put the data to be inserted in datagridview using array
here is my code
Dim row As String() = New String() {MetroTextBox12.Text, MetroTextBox11.Text, MetroTextBox13.Text}
MetroGrid9.Rows.Add(row)
MetroTextBox12.Text = ""
MetroTextBox11.Text = ""
MetroTextBox13.Text = ""
the problem is when I scroll the datagridview using mouse wheel it shows a ArgumentOutOfRangeException
and here is the stack trace
StackTrace:
at System.Windows.Forms.DataGridView.set_FirstDisplayedScrollingRowIndex(Int32 value)
at MetroFramework.Controls.MetroGrid.OnMouseWheel(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseWheel(Message& m)
at System.Windows.Forms.Control.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 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at ElectronicClientLoanInformationAndPortalSystem.dbSettingsAdder.dbSettingsAdder_Load(Object sender, EventArgs e) in E:\2020 Program\ECLIPS SOLUTION\ECLIPS\ElectronicClientLoanInformationAndPortalSystem\Common Forms\dbSettingsAdder.vb:line 78
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at MetroFramework.Forms.MetroForm.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at MetroFramework.Forms.MetroForm.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)