Easy way to save items with focus

  • Thread starter Thread starter jehugaleahsa
  • Start date Start date
J

jehugaleahsa

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top