Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET Database and Reporting > Datagridview changes do not update to database


Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2012, 09:49 AM
matthiasH matthiasH is offline
Newcomer
 
Join Date: Mar 2012
Posts: 1
Default Datagridview changes do not update to database


Hi out there,

i need your help.

I have an application doing the following:
- Treeview with customers
- on clicking a treeview, for every project of this customer, a new MDIchild opens, where the products of this project are displayed
- the MDIchild is basically a DataGridView, which is connected to the products-table via a DataView

my Problem comes after changing a value in the products DataGridView:
- if i do not change the row, the changes will not go back to the database after an update
- if i do change the row after entering a new value, everything works fine

The strange thing is, that in both cases, the value in the DataTable is changed, the DataSet is "hasChanges=True" and the DataRow's state is "Modified".

I have tried to do DGV.EndEdit and .ClearSelection to somehow force him to take the changes. But still the same problem.

Hope, that anybody has a good idea...

Thanks in advance
many greetings from Germany
Matthias
Reply With Quote
  #2  
Old 04-24-2012, 03:26 PM
KevinPVBNewbie KevinPVBNewbie is offline
Newcomer
 
Join Date: Dec 2003
Location: Chicago Burbs, IL
Posts: 8
Smile I was looking for basically the same thing...

If I understand what you're trying to do, I think I found an example on codeproject.com.

http://www.codeproject.com/Articles/...g-Updates-to-a

Hopefully this is what you're looking for. It was helpful to me.
__________________
America will never be destroyed from the outside. If we falter and lose our freedoms, it will be because we destroyed ourselves.

- Abraham Lincoln
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->