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
2490
ExitEditMode on UltraWinGrid
posted

I have windows form with one UItraToolbarsManager with on buttonTool, one UltraWinGrid and One UltraButton.

When I'm on EditMode on my grid :

1 - When I'm clicking on my windows form Ultrabutton : Is calling _AfterCellUpdate and after don't calling _Click event the don't call my sub.  When I clicking twice is ok, because is ExitEditMode on first click.

Solution : I put ExitEditModeOnLeave = False and adding utm.PerformAction(UltraGridAction.ExitEditMode) on my _Click event. it's this the right choice ?

2 - When I'm clicking on my UltraToolbarsManager bouttonTool : Is calling _ToolClick and never calling my _AfterCellUpdate.

Solution : I'm adding on my _ToolClick utm.PerformAction(UltraGridAction.ExitEditMode) and is ok.  It's this the right choice for this ?

 

Francois.

 

Parents
  • 469350
    Offline posted

    Hi Francois,

    The difference between UltraButton and a toolbar button is that the UltraButton is a control and takes focus. So when you click the UltraButton, the grid loses focus and automatically updates. The toolbar button does not take focus so the grid never loses focus.

    If you need to save the contents of the grid, then calling ExitEditMode in the toolbar button click is a good idea. You may also want to call grid.Update which will tell the grid to commit any pending changes to the underlying data source.

Reply Children