473,404 Members | 2,187 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,404 software developers and data experts.

Easy way to save items with focus

Hello:

We are running into an issue. Whenever our users save using either the
save key or a BindingNavigator, whatever control is in focus won't be
updated. Our users are getting confused when they are asked whether
they want to save their changes.

Is there a way to force the the control changes to be accepted prior
to saving? Is there an easy way to add this to all of our code?

Thanks,
Travis
Jun 27 '08 #1
2 1425
On Tue, 27 May 2008 14:04:33 -0700, je**********@gmail.com
<je**********@gmail.comwrote:
We are running into an issue. Whenever our users save using either the
save key or a BindingNavigator, whatever control is in focus won't be
updated. Our users are getting confused when they are asked whether
they want to save their changes.

Is there a way to force the the control changes to be accepted prior
to saving? Is there an easy way to add this to all of our code?
You're pretty vague about what you mean by "save items" and "changes to be
accepted", so I'll make some guesses: you've got controls that use data
binding to store their values to some data structure which can then be
explicitly saved by the user. Since data binding uses the control
validation logic to detect when to update the values, and since that
usually happens when a control's focus is changed, changes made to a
control without a subsequent change in focus are not updated in the bound
data structure.

If that's all correct, then you probably just need to call the
ValidateChildren() method on your Form instance.

If that's not the answer, I'm afraid you're going to have to do a better
job asking the question. As I said, it's pretty vague as stated so far.

Pete
Jun 27 '08 #2
On May 27, 3:48*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Tue, 27 May 2008 14:04:33 -0700, jehugalea...@gmail.com *

<jehugalea...@gmail.comwrote:
We are running into an issue. Whenever our users save using either the
save key or a BindingNavigator, whatever control is in focus won't be
updated. Our users are getting confused when they are asked whether
they want to save their changes.
Is there a way to force the the control changes to be accepted prior
to saving? Is there an easy way to add this to all of our code?

You're pretty vague about what you mean by "save items" and "changes to be*
accepted", so I'll make some guesses: you've got controls that use data *
binding to store their values to some data structure which can then be *
explicitly saved by the user. *Since data binding uses the control *
validation logic to detect when to update the values, and since that *
usually happens when a control's focus is changed, changes made to a *
control without a subsequent change in focus are not updated in the bound *
data structure.

If that's all correct, then you probably just need to call the *
ValidateChildren() method on your Form instance.

If that's not the answer, I'm afraid you're going to have to do a better *
job asking the question. *As I said, it's pretty vague as stated so far.

Pete
Nope, you got it right. I will try that tomorrow.

Thanks,
Travis
Jun 27 '08 #3

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

Similar topics

9
by: Alpha | last post by:
Hi, How can I set all the items in a listbox to be selected? I can't find a property or mehtod to do it so I thought I'll try using setselected method but I need to find out how many items are in...
1
by: Mad Scientist Jr | last post by:
can someone explain how to simply populate a grid in .net ? the way i understand it, there is no more msflexgrid, and instead is this new control that has to be tied to a dataset, and it is a real...
1
by: Mad Scientist Jr | last post by:
can someone explain how to simply populate a grid in .net ? the way i understand it, there is no more msflexgrid, and instead is this new control that has to be tied to a dataset, and it is a real...
0
by: sara | last post by:
I have a simple app, and I'm trying to add Orders. I have tblOrders and tblOrderDetails. First, the user selects the customer, then "orders", "new Order" The frmNewOrder simply assures the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.