Solved

Databinding problem...changes in bound controls do not change Dataset.HasChanges to true.

Posted on 2003-12-11
2
615 Views
Last Modified: 2009-05-08
I'm having a little trouble, I think relating to the DataSet.HasChanges and/or DataRow.RowState properties not reflecting changes made to a DataSet through DataBound TextBoxes on a windows form.

The form displays selected data (the DataSet is being filled successfully and the DataBindings are working). I edited the data through the TextBoxes and in debugging, the locals window shows those changes but the RowState remains Unchanged. So calling DataAdapter.Update() does nothing because the DataSet.HasChanges=false and DataRow.RowState=Unchanged.

Setting up this form using the Data Form Wizard seems to hook everything up correctly. Everything reads and writes as it should. But programmatically instantiating and filling the DataSet, defining the DataAdapter's commands, defining the controls' DataBindings, etc. causes this problem.

I set a breakpoint just after filling the DataSet initially, and just before calling DataAdapter.Update(). Both times the state properties of the DataSet reflected no change even though its data had changed.

What do I need to do to have the DataSet reflect its status accurately?
0
Comment
Question by:racinLFG
  • 2
2 Comments
 
LVL 8

Expert Comment

by:Dranizz
ID: 9924558
     Me.BindingContext(objaaa, "Calls").EndCurrentEdit()
0
 
LVL 8

Accepted Solution

by:
Dranizz earned 250 total points
ID: 9924615
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now