Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
Leave Event
posted

Hi,

I have a form with some UltraTabs having some usercontrols with embedded UltraLabel and UltraTextEditor, UltraDropdown or UltraCheckEditor. On the form I have also a UltraToolbarsManager. My Usercontrols are "bound" to a certain parameter, that has some information like Value, RowSource if needed and so on. I use the editors leave event to write the value of the editor back to my "boundparameter".

The problem is that if I click on a toolbarbutton in the top of the form I don't receive the leve event for the last control.The problem is, that one of these buttons is the "Save" button and so the changed value isn't send to the database.

How can I resolve this?

Kind regards

Patrick

Parents
  • 45049
    Suggested Answer
    posted

    Most toolbar tools don't take focus, including toolbar buttons.  That's why your Leave event isn't being raised - the focus still remains on the control where it previously was.

    When processing your Save toolbar button click, set focus to the form itself.  This should take focus away from whatever control currently has it, and should process that control's Leave event.  I haven't tested this myself yet, so there's a possibility that there may be more you need to do to get your updates to happen before the save action itself is processed.

Reply Children