error with datagridview


Author
Message
Felix M Avendano
Felix M Avendano
StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)StrataFrame Novice (62 reputation)
Group: Forum Members
Posts: 48, Visits: 1.5K
I have a datagridview (DGV from now) bounded via a BBS to a BO and within it (the DGV) I have a cell in the form of a combobox bounded to another BO via another BBS.

If I use the native function of the DGV when tries to insert a record I get this message: (if I disable the add function of the grid, this works fine)

Last but not least, the combobox field is part of the PK, so it cannot be null.

ArgumentException
  La fila proporcionada no pertenece a este control DataGridView. (The row doesn't belongs to this DGV)
Nombre del parámetro: e.Row

Source     : System.Windows.Forms

Stack Trace:
   en System.Windows.Forms.DataGridView.OnNewRowNeeded(DataGridViewRowEventArgs e)
   en System.Windows.Forms.DataGridView.OnRowEnter(DataGridViewCell& dataGridViewCell, Int32 columnIndex, Int32 rowIndex, Boolean canCreateNewRow, Boolean validationFailureOccurred)
   en System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
   en System.Windows.Forms.DataGridView.OnCellMouseDown(HitTestInfo hti, Boolean isShiftDown, Boolean isControlDown)
   en System.Windows.Forms.DataGridView.OnCellMouseDown(DataGridViewCellMouseEventArgs e)
   en System.Windows.Forms.DataGridView.OnMouseDown(MouseEventArgs e)
   en System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.DataGridView.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   en System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search