TMS FNC Data Grid button cell loses focus

Gday,

I have a datagrid on a form. It has four columns. The first is a name, the second a score, the third and fourth increment and decrement the value in column two, respectively.

When I click the increment or decrement button, the OnCellButtonClick event correctly fires, and in the event function I modify the content of the score cell. And this is where my problem seems to occur: a second click on the same increment button doesn't fire the OnCellButtonClick event.

If I click on the decrement button, or on a button in another row, all functions as normal. I just can't click the same button twice!

If I remove the code that sets the value in the second cell, all seems to be working correctly.

What can I do to fix this, so that I can update the second column with a click on the buttons, please?

Regards and thanks,

Pat

Can you put together a sample?

Here it is...

It's C++Builder.

To reproduce the problem:

  • Click G+ or G-.
  • Click same button again (without moving the mouse) - this does not increment the second column for me.
  • Click the same button yet again (without moving the mouse) - increments again.

Other test:

  • Click G+ or G-
  • Click a different button - all should function okay.

Every second click on one button fails.

I think "loses focus" is incorrect - I just can't work out what's happening. After pressing one button, try quitting the application!

Regards and thanks,

Pat

tmsgridproblem.zip (9.4 KB)