Hi,
I used BeforeExitEditMode on my grid to do some validation before exit UltraGridCell, but when I'm in EditMode in a cell and click on a button of my ribbon, BeforeExitEditMode not raise.
How can I catch this event to solve my problem when I click on a Ribbon button ?
Thanks a lot.
ExitEditMode doesn't fire in this case because a toolbar or ribbon button does not take focus. Therefore, the grid does not lose focus and it has no reason to leave edit mode.
If you need the grid to commit any current changes and exit edit mode, then you can do this in code by calling:
grid.PerformAction(ExitEditMode);
and also possibly:
grid.UpdateData()