Hi all I am new to DataGridViews, wanting to update the database after a cell is edited in the DGV, how is this accomplished? I am using a tableAdapter and a strong typed dataset? VB.Net2008 Express/SqlServerExpress2008.
I'm not sure exactly. There are probably tutorials on MSDN.Microsoft.com. TableAdapters are wizard-created objects in VB.Net to help you with your database access. I've never used them other than in testing. I prefer to use DataSets, Commands and DataAdapters. If you want to write your own code instead of using the wizard, your DataAdapter will need an .InsertCommand, .UpdateCommand and .DeleteCommand.
Here's an article which explains it in greater detail.
Actually if you call the TableAdapter.Update in the dvg_CellEndEdit Event it will update the row info to the database. I had some editing to do in the Update statement it is working now. I just wanted it to do this automatically instead of having a button, you just in case they forget and they will. LOL
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.