Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 2005 DataGridView Changes updated in the DataSet

Status
Not open for further replies.

vttech

Technical User
Joined
Jan 28, 2006
Messages
297
Location
US
I am familiar with populating a datagridview with a dataset and then using a dataAdapter to update the Database based on the Dataset.

But how do you update a Dataset based on changes make in a DataGridView?

Example in a datagridview control that is populated with info I click on one of the cells and change the info how can I update the dataset after I have lost focus of that cell and thus update the database?


Newbie in search of knowledge
 
I believe that if the dataset is bound to the datagridview, the update should be automatic. It will be committed to the datatable when you click on another row in the grid (which implicitly calls EndEdit on the row just changed), or when you explicitly call EndEdit in your code somewhere.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top