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
775
UltraGrid BeforeExitMode event and UltraToobarManager (Ribbon)
posted

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.

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    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()