>>Now the problem. My grid has three columns with InGrid text boxes. The user can click on the column header to set the index. I would like the record pointer to remain on the current record when this is done. My code is as follows:
>>
>>thisform.grid1.column2.header1.forecolor = RGB(128,0,0)
>>thisform.grid1.column2.header1.fontBold = .t.
>>thisform.grid1.column3.header1.forecolor = RGB(0,0,0)
>>thisform.grid1.column3.header1.fontBold = .f.
>>thisform.grid1.column4.header1.forecolor = RGB(0,0,0)
>>thisform.grid1.column4.header1.fontBold = .f.
>>thisform.grid1.column2.ingrid2.setfocus
>>WAIT WINDOW '' TIMEOUT .01 &&& from an earlier InGrid problem thread
>>cur_rec = recno()
>>set order to shotorder
>>pe_index = shotorder
>>go cur_rec
>>thisform.refresh
>>
>>For whatever reason, this code fails. The record pointer moves (consistently) to another record. There was an earlier InGrid thread in which it was indicated that there was some side effect in InGrid of clicking in the column header. Any thoughts on this.
>>
>>Alex
>
>I have the same problem and also with the TAB key, If you know what's happening let me know it, please thanks.... José
Hi Alex,
Just put the next command after the set order to tag sentence
thisform.grid1.column2.header1.forecolor = RGB(128,0,0)
thisform.grid1.column2.header1.fontBold = .t.
thisform.grid1.column3.header1.forecolor = RGB(0,0,0)
thisform.grid1.column3.header1.fontBold = .f.
thisform.grid1.column4.header1.forecolor = RGB(0,0,0)
thisform.grid1.column4.header1.fontBold = .f.
thisform.grid1.column2.ingrid2.setfocus
set order to shotorder
GO RECNO()
GO RECNO() is basically used for refreshing the relationships. VFP assumes that the record pointer is changed when you issue it and so it refreshes the records in the grid in your case too.
See Kamal's suggestion for the Problem with grid refresh on 07/07/98.
I hope this solve your problem... José.
Previous
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