473,399 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

RejectChanges on databinding control

Hi Group,
I have a form with textboxe, maskedit controls including two
buttons (Add, Cancel). Controls are bound to a dataset as follows:

txtName.DataBindings.Add(New Binding("Text",
dDatasetA.Tables("Charge"), "Name"))
maskPhone.DataBindings.Add(New Binding("Value",
dDatasetA.Tables("Charge"), "Number"))

On load event I bring up an existing record and then press <Addworks
fine (clears name and number fields), and, <cancelhas the following
code:
dDataset.Tables("Charge").RejectChanges()

The difficulty I'm having is that RejectChanges doesn't restore number
field to the original value, name field works fine. The only
difference between above two line is the propertyname. Why Name
field, on rejectchanges, goes back to the original value and not the
number field?

Thanks
Ian
Jan 16 '08 #1
2 1939
insade,

I would search in your case in another place. What happens with a change is
that the original field is stored in a seperated field. The rowstate (there
is only one rowstate) is set to changed. If you reject the changes then the
original fields are again set over the changed fields and the rowstate is
set to unchanged.

Cor

Jan 16 '08 #2
Sorry Cor - I forgot to mention in my previous post that it happens
only on
(.AddNew). If simply editing the number field and rejectchanges then
it works fine.
Only when adding (.addnew) the rejectchanges doesn't work on number
field with
propertname = 'Value'. I'd appreciate any help/ideas.

Ian
Jan 16 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Maurice Mertens | last post by:
Hi, I'm having a form with a bound control "ID" and it's bound to an Access database. The field ID is an autonumbering field. When I add a new record, the ID is numbered 1 up, for example from...
2
by: Saso Zagoranski | last post by:
Hi again! I have two DataSets... I add some data to both of the dataset and the I call: dataAdapter1.Update(dataSet1); dataAdapter2.Update(dataSet2); if there is an exception in any of the...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
5
by: Mark R. Dawson | last post by:
Hi all, I may be missing something with how databinding works but I have bound a datasource to a control and everything is great, the control updates to reflect the state of my datasource when I...
3
by: Geoff | last post by:
Hi Can anybody suggest how to get round the following problem? I have a form (form A for the sake of argument) which accepts data to be put into a DataTable. If the cancel button is pressed, I...
9
by: Nathan Sokalski | last post by:
I have a very simple UserControl which contains an Image and a Label, which I use to display an image with a caption. I am using this control inside a DataList, setting the two Public variables...
1
by: CorporateCoder | last post by:
Hi, I am trying to bind the selected value of a databound dropdown box in a databound gridview control to the value being displayed in the template column the dropdown box has been added to. ...
1
by: Owen Blacker | last post by:
I've spent loads of time Googling to try to work this one out and I'm sure it's something obvious. I get an InvalidOperationException reading "Databinding methods such as Eval(), XPath(), and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.