General information
Category:
The Mere Mortals Framework
Title:
Grid highlight on wrong record after requery
Kevin,
I have a cBizObjMaintenance form that has a cPageFrame on pgfBizObj.Page2 named pgfResources.
The following properties are set on pgfResources:
lAutoSetFocus = .F.
lReadOnlyIgnore = .T.
lUIEnablerNewRecord = .F.
On pgfResources.Page2 I have a cListObjEdit that displays the child records.
If I click on the second row of the child grid on cListObjEdit, the correct row is highlighted. At this point if I select the 'Refresh' toolbar button (that runs form.requery), the record pointer (and row highlight) move to record #1, which is all cool.
But, if focus is on any other object on the form other than the child grid on cListObjEdit when the 'Refresh' button is pressed, the row highlight remains on the second record of the grid, even though the actual record pointer has moved back to record #1. This can be verified by the fact that pressing the 'Edit' button edits record #1, even though the highlight was on record #2. Also, if you tab into the grid, the highlightbar will jump back to record #1, since the Grid.When() calls SetHighLightbar().
Also, even though SetHighlightBar() is not being called correctly, SetButtonEnabledStatus() appears to be called correctly, because I have some custom buttons on the form that are being enabled/disabled correctly when the record pointer moves back to the first record.
The above also occurs when pressing the toolbar navigation buttons instead of 'Refresh'.
Any ideas as to how this can be remedied?
TIA,
Ted.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only