I have an sfDataGrid bound to an OleDb Table.
If I delete one or more row, and then I try to add a new one, whenever I click away to change the selected row I get an unhandled exception:
System.IndexOutOfRangeException: 'L'indice [idx] è negativo oppure superiore al totale delle righe.'
System.IndexOutOfRangeException
HResult=0x80131508
Messaggio=L'indice 12 è negativo oppure superiore al totale delle righe.
Origine=System.Data
Analisi dello stack:
in System.Data.DataView.GetRow(Int32 index)
in Syncfusion.Data.DataTableCollectionView.CommitNew()
in Syncfusion.WinForms.DataGrid.GridAddNewRowController.CommitAddNew(Boolean changeState)
in Syncfusion.WinForms.DataGrid.Interactivity.CurrentCellManager.SetCurrentCell(Int32 rowIndex, Int32 columnIndex)
in Syncfusion.WinForms.DataGrid.Interactivity.CurrentCellManager.HandlePointerOperation(RowColumnIndex rowColumnIndex)
in Syncfusion.WinForms.DataGrid.Interactivity.RowSelectionController.HandlePointerOperations(DataGridPointerEventArgs args, RowColumnIndex rowColumnIndex)
in Syncfusion.WinForms.DataGrid.GridHandler.OnMouseUp(Object sender, MouseEventArgs e)
in System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
in System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
in Syncfusion.WinForms.Controls.SfScrollControl.OnMouseUp(MouseEventArgs e)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in Syncfusion.WinForms.Controls.SfScrollControl.WndProc(Message& msg)
in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.RunDialog(Form form)
in System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
in IntegrazioneHRS.MainForm.btnParametriAzienda_Click(Object sender, EventArgs e) in C:\Users\bandi\Google Drive\HRS\Sviluppo\Sorgenti\IntegrazioneHRS V2\IntegrazioneHRS\MainForm.vb: riga 600
in System.Windows.Forms.Control.OnClick(EventArgs e)
in System.Windows.Forms.Button.OnClick(EventArgs e)
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.RunDialog(Form form)
in System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
in System.Windows.Forms.Form.ShowDialog()
in IntegrazioneHRS.MainModule.Main() in xxx\MainModule.vb: riga 127
Questa eccezione è stata generata in origine nello stack di chiamate seguente:
System.Data.DataView.GetRow(int)
Syncfusion.Data.DataTableCollectionView.CommitNew()
Syncfusion.WinForms.DataGrid.GridAddNewRowController.CommitAddNew(bool)
Syncfusion.WinForms.DataGrid.Interactivity.CurrentCellManager.SetCurrentCell(int, int)
Syncfusion.WinForms.DataGrid.Interactivity.CurrentCellManager.HandlePointerOperation(Syncfusion.WinForms.GridCommon.ScrollAxis.RowColumnIndex)
Syncfusion.WinForms.DataGrid.Interactivity.RowSelectionController.HandlePointerOperations(Syncfusion.WinForms.DataGrid.Events.DataGridPointerEventArgs, Syncfusion.WinForms.GridCommon.ScrollAxis.RowColumnIndex)
Syncfusion.WinForms.DataGrid.GridHandler.OnMouseUp(object, System.Windows.Forms.MouseEventArgs)
System.Windows.Forms.Control.OnMouseUp(System.Windows.Forms.MouseEventArgs)
Syncfusion.WinForms.Controls.SfScrollControl.OnMouseUp(System.Windows.Forms.MouseEventArgs)
...
[Stack di chiamate troncato]