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.
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.
Hi Mike,
Thank you for tour answer.
On ultraButton, Why the event UltraButton.Click is not execute when is in Editmode on the grid, when the user click on UltraButton ?
it's is normal ?
I tried this out and it seems to work okay for me. The click event will not fire if you have a dropdown dropped down (because the dropdown closes on the first click), but not if it's just a normal edit cell.
Yes I have Dropdown on other column.
Ok, I put false to ExitEditModeOnLeave and I add ExitEditMode on my ub.Click event.
Thank you.