Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2003-12-11
2
620 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

829 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