Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

18 Experts available now in Live!

Get 1:1 Help Now