Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I know the record I am sitting on in a grid ?

Status
Not open for further replies.

DeltaWind

Programmer
Feb 14, 2003
13
US
This may sound mundane for a lot of people, but I cant figure it out. Depending on the record that is currently selected on a grid, i what to display a curresponding image on an unrelated image control on the form. I do I know what record number. thanks.
 
Your grid is bound to a table/cursor/view, right? So every time you move to a new row in a grid, you're changing the record pointer in its RecordSource. With
lnRecNo = RECNO()
in the AfterRowColChange() event method I think you'll get what you want.

TheSofty
 
Duh!
That is what happens when you program in multiple lanquages at the same time. I was already looking for a grid.selected property or some funky stuff like that when the answer was staring me in the face. vfp rocks. thanks for setting me straight.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top