[wxPython] forcing EndEdit in a grid

If I write something in a cell of a grid, and I click in another control
in the frame (thus passing the focus to this other control) before the
editor of the cell (in my case a wxTextCtrl) passes the value back to
the grid, the cell editor stays alive.

How can I force the editor to pass the value to the cell when the grid
loses the focus???

Raul