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.
I think this kind of validation will be very complicated and difficult. I'm not sure that this is possible.
What I would do is use the BeforeExitEditMode event of the grid, instead.
Thanks for your reply. In fact, my UltraGrid are in a UserControl. I catch BeforeExitEditMode event on my grid to do some validation to prevent user leaving cell. When I change (click) on other grid or other cell it's works like a charm because other grid is in my UserControl.
When I click on other part of my screen (out of my usercontrol), BeforeExitEditModen raise 2 times. In each time the cell is validate, therefore e.Cancel = !isValid();
In this case, isValid() function return false -> (e.Cancel = true), but despite evaluate e.Cancel = true, it still leaves the cell.
It's not normal ? If e.Cancel = true, UltraGrid doesn't ext edit mode ?!
Do you have an idea ?
Thanks a lot