Alert when NEW rows added to Datagridview

xzibited2

Active member
Joined
Jul 9, 2008
Messages
26
Programming Experience
1-3
Scenario: I have a datagridview populated off a remote database via ODBC. It displays ticket numbers, and as new tickets are opened the datagridview displays those tickets. As old tickets are closed, they disappear.

I'm looking to fire an event every time a new row is added. Can't really rely on row count, as there could be a scenario where an old ticket gets closed at the same time a new ticket gets opened (net zero to the row count, and in this situation I'd still want the event to fire sicne there is a new ticket).

Any thoughts?
 
You don't have to fire any event. The event is already raised. You just have to handle it. Have you read the documentation for the DataGridView class to see what events it has? The choice should be quite easy once you've seen that list. The documentation should pretty much always be your first port of call.
 
Back
Top