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
160
Leave event not fired on an active UltraTextEditor if pressing a Tool in a UltraToolbar
posted

Hello,

 I have a form with a toolbar and  a few data-bound textboxes. One of the tools is the Save button. I enter the data in the textboxes and then I press Save, the active textbox does not push the data back into the bound object, so I have an incorrect save. That is happening because there is no leave event on the active TextBox when I press Save.

This may be because the UltraToolbarManager is not a Control, and thus it does not activate and receive focus as other controls.

Any hint on what should I do so my TextBox (or any other control, for that matter) call the Leave event on pressing a ButtonTool in UltraToolbarsManager?

Thanks.

Parents
No Data
Reply
  • 44743
    posted

    The tools intentionally do not take focus when they are clicked if they do not have to. This is needed so that if you have a document you are editing and you press a 'Bold' formatting button on a toolbar, your selection which you wanted to have bold would remain selected. To get around this, before performing your Save logic, you could manually give focus to another control. You can even place a dummy button control off screen and call Focus on it before saving your data.

Children
No Data