Advertisement

08.01.2007 at 01:21PM PDT, ID: 22735836
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

VB.NET: DatagridView / DataAdapter / InsertCommand - cannot update database after adding new row to datagridview

Tags: datagridview, update, row
Hello.
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.

Jae
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: fesit
Solution Provided By: jpaulino
Participating Experts: 2
Solution Grade: B
Views: 382
Translate:
Loading Advertisement...
08.02.2007 at 12:16AM PDT, ID: 19615028

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 12:16AM PDT, ID: 19615029

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 12:17AM PDT, ID: 19615031

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 06:27AM PDT, ID: 19616643

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 07:06AM PDT, ID: 19617018

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 07:33AM PDT, ID: 19617281

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 07:48AM PDT, ID: 19617424

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 09:59AM PDT, ID: 19618735

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 11:16AM PDT, ID: 19619448

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 12:50PM PDT, ID: 19620258

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.02.2007 at 01:20PM PDT, ID: 19620508

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.03.2007 at 02:33AM PDT, ID: 19623513

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.03.2007 at 07:29AM PDT, ID: 19625272

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29