how to store wxGrid cell values

Thanks Cristina, but this doesn't seem to work. I tried something like

EVT_SET_FOCUS(self.linkGrid, self.onGridSetFocus)
EVT_KILL_FOCUS(self.linkGrid, self.onGridKillFocus)

where self.linkGrid is my wxGrid

You should
         EVT_KILL_FOCUS(self.linkGrid.GetGridWindow(), self.onGridKillFocus)
instead. The wxGrid is made of several windows, so you have to connect your handler to the right one.

Besides that, even if it worked, I am not sure how I could save the values:
GetCellValue(x,y) does not report the "running" value apparently because
EVT_GRID_CELL_CHANGE has not been fired.

I think this should work:

row = GetGridCursorRow()
col = GetGridCursorColumn()
ctrl = GetCellEditor(row, col)->GetControl()
if (ctrl != None and ctrl.IsShown()):
         val = ctrl.GetLabel()
else:
         val = GetCellValue(row, col)

Any more suggestions? Do I need to write a custom wxGridCellEditor just
for this and intercept all keystrokes?

I don't think it's necessary, see above.

HTH,

Cristina.

···

-------------------------------------------------------
Connex scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Connex automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. Pentru a inlatura efectele nedorite si din dorinta de a va oferi in permanenta servicii de cea mai buna calitate msajele detectate ca fiind infectate vor fi sterse automat .
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat de virusi.

Disclaimer: RAV Antivirus may not be able to detect all new viruses and variants. In order to remove unwanted effects and to continuously provide quality services all infected e-mails will be automatically deleted .Please be aware that there is a risk involved whenever opening e-mail attachments to your computer and that MobiFon is not responsible for any damages caused by viruses.