I am using VB.NET 2005.
I set up a dataadapter with an InsertCommand, UpdateCommand and DeleteCommand.
I have a datagridview on the form.
The datagridview has 6 columns.
An ID column (which is hidden), an Identifier column, a Description column and a few other columns.
The Identifier column and Description column are the only 2 columns that are editable/writeable.
What I want to do is update the database using the dataadapters InsertCommand after a user adds a new row to the grid.......which is to say the user naviated to the NewRow row in the grid, manually entered information into the 2 columns (Identifier, Description) and then hit the Return Key (or used an arrow key to naviate to another row in the grid).
I cannot seem to accomplish this goal. It seems that if I execute the InsertCommand on that datagrids LeaveRow method, it is not getting all the data for the row I just left.
(ie. Say I enter an Identifier in the 1st column. Then I tab to the 2nd columns. Enter a description, then hit enter. When it falls into the LeaveRow event, it doesnt see any data in the 2nd column - and Im guessing whatever object contains the 'added rows' for the datagridview, does not have the infomation that I just entered.)
Can anyone help me out here? I'm guessing it shouldn't be toooooo difficult to commit an addition to a database after the user leaves focus of the AddNew row - but I seem to be having a little bit of trouble with it.
Thank you in advance for your help.