TamarGranor
Programmer
I have a fairly simple grid, set up essentially as a picklist:
AllowCellSelection = .F.
Highlight = .F.
HighlightRow = .F.
HighlightStyle = 2
Various other settings (DeleteMark and RecordMark both .F.) in the PropSheet as well.
On the same page (of a pageframe), I have data-entry controls for the records that are shown in the grid. I have code in BeforeRowColChange and AfterRowColChange to deal with what happens when the user clicks on a different row than the one she's currently editing. The form is configured so that it knows whether the user has made any changes to the record currently being edited.
I'm finding that sometimes, but not always, BeforeRowColChange fires two or more times in succession and some (maybe all) of those times results in a "REcord out of range" error, which appears in such a way as to make me think the grid's been wiped out.
The code called by BeforeRowColChange does, under some circumstances, ZAP the cursor that's the RecordSource of the grid and repopulate it. It should never result in fewer records than we had before (at least, not yet--still some work to do here), and since I'm using ZAP and INSERT INTO to repopulate the cursor, shouldn't rip the cursor out from under the grid.
So what I'm looking for is reasons BeforeRowColChange will fire repeatedly. (I've already tried adding a flag to make sure it executes the core code only once, and it didn't solve the problem.)
TIA,
Tamar
AllowCellSelection = .F.
Highlight = .F.
HighlightRow = .F.
HighlightStyle = 2
Various other settings (DeleteMark and RecordMark both .F.) in the PropSheet as well.
On the same page (of a pageframe), I have data-entry controls for the records that are shown in the grid. I have code in BeforeRowColChange and AfterRowColChange to deal with what happens when the user clicks on a different row than the one she's currently editing. The form is configured so that it knows whether the user has made any changes to the record currently being edited.
I'm finding that sometimes, but not always, BeforeRowColChange fires two or more times in succession and some (maybe all) of those times results in a "REcord out of range" error, which appears in such a way as to make me think the grid's been wiped out.
The code called by BeforeRowColChange does, under some circumstances, ZAP the cursor that's the RecordSource of the grid and repopulate it. It should never result in fewer records than we had before (at least, not yet--still some work to do here), and since I'm using ZAP and INSERT INTO to repopulate the cursor, shouldn't rip the cursor out from under the grid.
So what I'm looking for is reasons BeforeRowColChange will fire repeatedly. (I've already tried adding a flag to make sure it executes the core code only once, and it didn't solve the problem.)
TIA,
Tamar