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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to figure out what is the active row in a grid? 1

Status
Not open for further replies.

Aseem1234

Programmer
Nov 26, 2003
33
0
0
US
Hello,

I have a grid and I am trying to figure out which row the user selects in order to pull the information from that particular row and do some processing...however, i can't seem to figure out how to figure out which row is selected! Can someone help? I have the grid recordsource bound to a cursor.

Thanks
 
The record pointer of the cursor will be pointing at the selected record/row...just pull your information from that cursor that you've set up as the recordsource.

boyd.gif

[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
So you mean I can just say select * from cursorName and it will pull the data from the row the user selected?

Thanks
 
No, I'm saying that if you have a cursor let's say with 3 rows in it...

Fields:
FirstName LastName

Craig Boyd
John Smith
Bob Williams

...and this cursor is the recordsource for a grid and the user selects the row with John Smith in it then you can access the field values of the cursor...

?MyCursor.FirstName &&John
?MyCursor.LastName &&Smith

...selecting everything from the cursor as you have proposed above would just simply give you everything from the cursor, not the row's values.

boyd.gif

[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top