Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search and set focus on specific record on my grid
Message
From
03/12/2017 09:42:48
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
03/12/2017 09:41:50
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01656045
Message ID:
01656063
Views:
49
You don't need to do a locate or go top before doing a locate for.
>Hello Yousfi,
>
>I try your code like that:
>
>Select FI
>    Locate
>    Locate For Alltrim(FI.ref) == '2118661'
>    If Found()
>      SFT.pageframe1.ActivePage=1
>      SFT.pageframe1.Page1.Cont1.grid1.SetFocus()
>    Else
>      Messagebox("not found")
>    Endif
>
>
>In fact, the record pointer select the line of my grid where Alltrim(FI.ref) == '2118661', but after that , the record pointer return to the first line in the Grid without making the setfocus on the line with the value i want to locate.
>I presume that is the refresh method on the grid.
>How can solve this?, do i must keep the recno() of the value that i want and after that make a kind of go to recno() ?
>
>Best regards,
>Luis
Previous
Reply
Map
View

Click here to load this message in the networking platform