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
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.
Thanks for your quick reply. Unfortunatly this has no effect. I did it like follows:
private void OnToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e){ this.Focus(); Application.DoEvents();
// Other event code
}
Kind regardsPatrick