Click here to Skip to main content
15,923,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello every body,
SQL
I have a gridview with a BindingSource datasource
I do a filter on the BindingSource then I add a row in the grid and then I click enter the following exception appears entree


à System.Collections.ArrayList.get_Item(Int32 index)
à System.Windows.Forms.DataGridViewRowCollection.SharedRow(Int32 rowIndex)
à System.Windows.Forms.DataGridView.get_CurrentCellInternal()
à System.Windows.Forms.DataGridView.CommitEdit(DataGridViewCell& dataGridViewCurrentCell, DataGridViewDataErrorContexts context, DataGridViewValidateCellInternal validateCell, Boolean fireCellLeave, Boolean fireCellEnter, Boolean fireRowLeave, Boolean fireRowEnter, Boolean fireLeave)
à System.Windows.Forms.DataGridView.ProcessEnterKey(Keys keyData)
à System.Windows.Forms.DataGridView.ProcessDialogKey(Keys keyData)
à System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
à System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
à System.Windows.Forms.Control.PreProcessMessage(Message& msg)
à System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
à System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
à System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(Form mainForm)
Posted
Updated 27-Aug-14 23:03pm
v3
Comments
Richard MacCutchan 28-Aug-14 4:49am    
You need to add some context and show the code where the error occurred. Please edit your question and put <pre> tags around your code and messages so they are more clearly readable.

1 solution

Based on the exception stack you have provided, you are accessing an array item that does not exist.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900