Hi,
I used my own UserControl (Editing and Rendering) in UltraContainerControl. This UserControl contains 1 UltraLabel, 1 UltraTextEditor.
I would like do some validation in my UltraTextEditor when press tab, enter, mouse click to prevent user from leaving the cell.
I use BeforeExitEditMode on my UltraTextEditor, but when I click with mouse on other row, new row is selected but the UltraTextEditor is already in edit mode.
How can I used correctly this behaviour with UltraControlContainer and BeforeExitEditMode ?
Thanks a lot.
Hello Booorf,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
We are going to need a specific example without all the extra code and components in order to look into this and find the issue that is causing this behavior. Could you please share a much simpler application, so that we will able to resolve this for you.
I created the following case for you: 'CAS-90766-VMX15M' and will update you through it.
Thanks for your reply. Your following changes it's working fine.
I made some changes in my sample to demonstrate a new issue with BeforeExitEditMode. I put my two grids in an UltraPanel and in a UserControl.
I added some DockingPane on the left on the screen and a UltraTExtEditor on the right of the screen.
If you entering in ultraGrid1 COL2 (A 10). You click on the first docking left pane. BeforeExitEditMode of ultraGrid1 is raised with e.cancel = true. But you can enter in the UltraTextEditor to change value text. But ultraGrid1 is already in edit mode with cursor hidden.
It's seems to be a bug ?
I made the following changes and if I got your requirements right I believe that it is working fine:
private void answerUltraTextEditor_BeforeExitEditMode(object sender, Infragistics.Win.BeforeExitEditModeEventArgs e) { //if (e.IsForcingExit) return; if (tabbingOut) { tabbingOut = false; e.Cancel = true; } tabbingOut = false; }
bool tabbingOut = false; private void answerUltraTextEditor_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Tab) { tabbingOut = true; } else tabbingOut = false;
Please feel free to let me know if I misunderstood you or if you have any other questions.