Link to home
Start Free TrialLog in
Avatar of gavvic
gavvic

asked on

Datagridview update problem

The datagridview is bound to dataset1, and table Invoice.
after I edit cells, and click a "save" button to perform following:  
OleDbConnection1.Open()
Me.OleDbDataAdapter2.Update(DataSet1.Invoice)
OleDbConnection1.Close()
the datagridview doesn't update the last record(last cell). But if I press key Enter before click "save" button, all changes including the last record will be saved in the database. How can I fix this problem, and how to perform this Enter action by code?
ASKER CERTIFIED SOLUTION
Avatar of amyhxu
amyhxu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gavvic
gavvic

ASKER

Thanks amyhxu. I have fixed the problem now, I should use a button not a toolstrip to preform this "save".
Could you mind to answer my another question?  I am using Datagridview of VB.net 2005, how can I show the last row when the form load? Thanks again.
Sorry I haven't used .net 2005, and I have no idea what a datagridview look like. Other experts may be able to help you on this issue.