Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Skip in recordsource or Scroll
Message
From
25/09/2010 07:29:57
 
 
To
24/09/2010 13:19:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01482559
Message ID:
01482695
Views:
63
>Kevin --
>
>I have pursued this issue before here in the UT, and I'll tell you the suggestion that worked:
>
>The only way to insure that a particular record is at the top of a grid is to shrink the grid so that it only has one row. Then, if you re-expand it, the record you want will stay put. Here's the code I use
with .MyGrid
>     lnHeight = .Height
>     .Height = .HeaderHeight + .RowHeight + 5 + Iif( Inlist(.ScrollBars, 1, 3), Sysmetric(8), 0)
>     .Refresh
>     .Height = lnHeight
>endw 
>>I tried that and it does not seem to do anything, whereas the skip method worked but didn't end up where it should have. Is there some kind of trick to using the doscroll method? I do thisform.grid1.doscroll(0) and it does not scroll the grid up.

Add thisform.lockscreen=.T. before your code, and thisform.lockscreen=.F. after.
Previous
Reply
Map
View

Click here to load this message in the networking platform