ralphcarter
Programmer
I have an application where I want to allow the user to change the display order of a table in the grid by clicking on the appropriate column header. I have tried using the code below. The order changes but the cursor does not stay with the current record. When I click on the header a second time the cursor then goes to the appropriate record. It appears the cursor is static in the display and does not move in the display to the appropriate record. What am I missing? I know this has to be possible.
Code below:
*nRec = RECNO()
SET ORDER TO TAG tagPlant
SEEK JOBXX ORDER TAG tagJobid
*GOTO RECORD nRec
this.Parent.Parent.coljobid.SetFocus
this.Parent.Parent.Refresh
I have tried this 2 ways. First with the seek using the original tag and that didn't seem to work then I tried to capture the record number and explicitly set the cursor to the record number. No success here either. The above code currently resides in the click event for the header (don't know if that matters).
All help is appreciated
Ralph Carter
Programmer
QUESTware Corp.
Code below:
*nRec = RECNO()
SET ORDER TO TAG tagPlant
SEEK JOBXX ORDER TAG tagJobid
*GOTO RECORD nRec
this.Parent.Parent.coljobid.SetFocus
this.Parent.Parent.Refresh
I have tried this 2 ways. First with the seek using the original tag and that didn't seem to work then I tried to capture the record number and explicitly set the cursor to the record number. No success here either. The above code currently resides in the click event for the header (don't know if that matters).
All help is appreciated
Ralph Carter
Programmer
QUESTware Corp.