DataGridView RowEnter

DataGridView RowEnter

Post by RGF2ZSB » Thu, 02 Nov 2006 02:29:02

I have two DataGridViews in a Parent/Child relationship. When RowEnter is
raised in the parent, I want to populate the child with the corresponding

I notice that when a new parent row is clicked, the RowEnter is fired first
for the row clicked, then for any number of the other rows (always starting
at row index 0 then working it's way through) and finally landing on the row

Does anyone know why this happens or how to defeat it?

1. Binding List<T> to a DataGridView = DataGridView Empty

2. Refreshing datagridview contents after a failed delete in bound datagridview

I have relational integrity set up in my sql server 2005 database that
prevents cascading deletes in some cases.
I'm using a bound datagrid view and a tablenavigator. When I click the
delete button on it then the save button, I get the message saying a foreign
key constraint does not allow the deletion, but the row is no longer shown
in the datagridview. Only way I get to see it is to close my form and open
it again, then row is there OK.

Question is how do I refresh the datagridview after such a failed delete.

I can think of doing the checking to see if there are any child records in
the UI code UserDeletingRows event of the datagrid, then issuing a Cancel so
that the UI prevents the deletion, but that sort of circumvents the purpose
of letting your database doing the integrity checking.

Can anyone give me an idea on how to detect that a delete has failed using
these controls , I know how to do a refill. I just need to know what event
to use to launch it.

Any help appreciated,


3. DataGridView into another DataGridView

4. Class Inherits DataGridView, Errors: Rows(0).DataGridView

5. Datagridview - Writing Journal Transactions for a Datagridview

6. Copy from datagridview and paste to second datagridview

7. Where can I find DataGridView for VBA? DataGrid vs DataGridView

8. Where can I find DataGridView for VBA? DataGridView vs DataGrid?

9. Where can I find DataGridView for VBA? DataGridView vs DataGri

10. sum column item datagridview

11. When to Update() a database from datagridview

12. datagridview tutorial plz!!!

13. DataTable with UDT issue with DataGridView

14. VB.NET ADO Recordset DataGridView and Access not in sync w/oth