By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,039 Members | 455 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,039 IT Pros & Developers. It's quick & easy.

Event for after record added to DataGridView

Seth Schrock
Expert 2.5K+
P: 2,951
I'm used to using MS Access which has an event called After Insert. Now that I'm using a DataGridView, I'm looking for what event I should use. I have the DataGridView bound to a Binding Source. I need some code to run once the new record has been saved to the database. So far I have tried the AddingNew event for the Binding Source, RowsAdded and UserAddedRow for the DataGridView and all three occur before the record information is completely added and then saved to the database.

The Rows Added event runs when the form first opens.
The Adding New event runs as soon as click into a cell in the new row line.
After the first character is first entered in a cell of the new row line, the Rows Added event and then the User Added Row event runs.

I'm not sure what else to try.
May 7 '17 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.