Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 Tags
Subject: RE: Grid question
Thread ID: 209341 Message ID: 209350 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Saturday, December 27, 2008 4:25:33 PM         
   


Russel,
Saying key value I think it is indexed, then you could do like:

=seek(the_key_value, 'myGridAlias', 'keyTag')

However I would note soemthing else. Why are you dealing with substr() tricks, especially when you are not showing it. Instead you could use an SQL cursor as rowsource of your listbox. ie:

RowSourceType: 3
RowSource:
select myDate, myName, myKey from myTable order by myDate, myName into cursor crsMyList
ColumnCount: 2
ColumnWidths: 75,100

Then getting the key would be easier:
the_key_value = crsMyList.myKey


Furthermore if you use the same source instead of an SQL in listbox then you wouldn't need to do anything for the pointer, because as any selction is done in listbox, pointer would be automatically positioned on that record.

Cetin Basoz

ENTIRE THREAD

Grid question Posted by Russell Hill @ 12/27/2008 1:41:45 PM
RE: Grid question Posted by tushar @ 12/27/2008 3:20:54 PM
RE: Grid question Posted by Russell Hill @ 12/27/2008 10:25:46 PM
RE: Grid question Posted by tushar @ 12/28/2008 9:54:42 AM
RE: Grid question Posted by Cetin Basoz @ 12/27/2008 4:25:33 PM
RE: Grid question Posted by Russell Hill @ 12/27/2008 10:24:09 PM
RE: Grid question Posted by Cetin Basoz @ 12/28/2008 10:10:17 PM