ArgumentOutOfRangeException

Oct 1, 2007 at 9:35 AM
Hi,
I'm using the collection binded to a DataGridView. The DataGridView have the Enable Adding and Enable Editing properties setted to true.
When the user edit the data sometime occur the follow exception: ArgumentOutOfRangeException. The exception happen not always and when the user push Esc to remove the new row.

I believe that the error is related to the collection.

The stack trace is:

System.ArgumentOutOfRangeException: '3' non è un valore valido per
'indexStart'. 'indexStart' deve essere minore o uguale a 2.
Nome parametro: indexStart
in
System.Windows.Forms.DataGridViewRowCollection.GetPreviousRow(Int32
indexStart, DataGridViewElementStates includeFilter)
in
System.Windows.Forms.DataGridViewRowCollection.GetPreviousRow(Int32
indexStart, DataGridViewElementStates includeFilter,
DataGridViewElementStates excludeFilter)
in
System.Windows.Forms.DataGridView.CorrectRowFrozenState(DataGridViewRow
dataGridViewRow, DataGridViewElementStates rowState, Int32
anticipatedRowIndex)
in System.Windows.Forms.DataGridView.OnInsertingRow(Int32
rowIndexInserted, DataGridViewRow dataGridViewRow,
DataGridViewElementStates rowState, Point& newCurrentCell, Boolean
firstInsertion, Int32 insertionCount, Boolean force)
in
System.Windows.Forms.DataGridViewRowCollection.InsertInternal(Int32
rowIndex, DataGridViewRow dataGridViewRow, Boolean force)
in
System.Windows.Forms.DataGridView.DataGridViewDataConnection.ProcessListChanged(ListChangedEventArgs
e)
in
System.Windows.Forms.DataGridView.DataGridViewDataConnection.currencyManager_ListChanged(Object
sender, ListChangedEventArgs e)
in
System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
in System.Windows.Forms.CurrencyManager.List_ListChanged(Object
sender, ListChangedEventArgs e)
in
System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)
in System.Windows.Forms.BindingSource.InnerList_ListChanged(Object
sender, ListChangedEventArgs e)
in Vevy.Collections.RafCollection`1.OnListChanged(ListChangedEventArgs e)
in Vevy.Collections.RafCollection`1.Add(Box`1 Element)
in Falcom.Framework.DataLayer.EntityTable`1.Add(Box`1 Element)
in Vevy.Collections.RafCollection`1.Add(T Item, ObjectStatusType
StatusType)
in Vevy.Collections.RafCollection`1.AddNew()
in
Vevy.Collections.RafCollection`1.System.ComponentModel.IBindingList.AddNew()
in System.Windows.Forms.BindingSource.AddNew()
in System.Windows.Forms.CurrencyManager.AddNew()
in System.Windows.Forms.DataGridView.DataGridViewDataConnection.AddNew()
in
System.Windows.Forms.DataGridView.DataGridViewDataConnection.OnNewRowNeeded()
in System.Windows.Forms.DataGridView.OnRowEnter(DataGridViewCell&
dataGridViewCell, Int32 columnIndex, Int32 rowIndex, Boolean
canCreateNewRow, Boolean validationFailureOccurred)
in System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32
columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean
validateCurrentCell, Boolean throughMouseClick)
in System.Windows.Forms.DataGridView.OnCellMouseDown(HitTestInfo hti,
Boolean isShiftDown, Boolean isControlDown)
in
System.Windows.Forms.DataGridView.OnCellMouseDown(DataGridViewCellMouseEventArgs
e)
in System.Windows.Forms.DataGridView.OnMouseDown(MouseEventArgs e)
in System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons
button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.DataGridView.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.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Coordinator
Oct 4, 2007 at 9:43 PM
Please try the latest alpha release.
It should be fixed.

Thanks and let me know.