Easy way to save items with focus

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jehugaleahsa@gmail.com

    #1

    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 BindingNavigato r, 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
  • Peter Duniho

    #2
    Re: Easy way to save items with focus

    On Tue, 27 May 2008 14:04:33 -0700, jehugaleahsa@gm ail.com
    <jehugaleahsa@g mail.comwrote:
    We are running into an issue. Whenever our users save using either the
    save key or a BindingNavigato r, 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
    ValidateChildre n() 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

    Comment

    • jehugaleahsa@gmail.com

      #3
      Re: Easy way to save items with focus

      On May 27, 3:48 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
      wrote:
      On Tue, 27 May 2008 14:04:33 -0700, jehugalea...@gm ail.com  
      >
      <jehugalea...@g mail.comwrote:
      We are running into an issue. Whenever our users save using either the
      save key or a BindingNavigato r, 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  
      ValidateChildre n() 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

      Comment

      Working...