I have a form with a grid and a 5-page pageframe. The grid lists patient names and the pageframe displays data for each patient. [AllowCellSelection] is set .F. and clicking on the row for any particular patient updates the rest of the form appropriately. As part of the updating process, The [Click] event on the grid runs a few methods, one of which is composed to update a series of 10 checkboxes. The code in the method is fine but, although the rest of the data updates, the checkboxes don't update, as though that one method isn't firing. If I click a second time (not [DoubleClick]) then the checkboxes are updated. As part of trying to diagnose this I used Debug, of course, but that didn't help because the routine worked perfectly when working through it stepwise! I should say that the very first time the grid is clicked, when the form is first opened, the correct result occurs .. .. just that once. I have not experienced this in any other project to date.
I have finally found a workable resolution which is satisfactory for keeping the project going. It doesn't tell me why the [Click] event is not responding as normal and I would be grateful if anyone has the answer.
My fix was to place a [SetFocus] right at the end of the method to switch focus to another object on the form (I elected the close button). It seems that clicking the grid row 'from outside' the grid persuades the [Click] event to behave properly (that's why it worked with Debug, of course, and why it works when the form is first opened).
I have finally found a workable resolution which is satisfactory for keeping the project going. It doesn't tell me why the [Click] event is not responding as normal and I would be grateful if anyone has the answer.
My fix was to place a [SetFocus] right at the end of the method to switch focus to another object on the form (I elected the close button). It seems that clicking the grid row 'from outside' the grid persuades the [Click] event to behave properly (that's why it worked with Debug, of course, and why it works when the form is first opened).