Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move active row in grid when doing grid.doscroll()
Message
From
12/10/2001 04:57:49
 
 
To
12/10/2001 02:01:19
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00567419
Message ID:
00567451
Views:
13
Hi!

You can do this only when grid is focused (activated), because RelativeRow property is available only when grid is focused. You can improve this situation somewhat by storing the RelativeRow value in the AfterRowColChange event of the grid to some property when it is not zero. This way you will be able to know it for grid even when it lost focus.

Then you have a relative row. Number of rows visible in the grid you can calculate using something like following expression:
floor((Grid.Height-Grid.HeaderHeight-iif(Grid.ScrollBars =...,sysmetric(HeightOfHorisontalScrollBar),0))/Grid.RowHeight)

having it you will know how much records you need to skip in the record source to show record pointer at top or bottom of the visible grid area.

HTH.

>I am controlling a grid from outside it in a text input box using a DOSCROLL. If the keypress event of the text box gets a PAGEDOWN, I am firing the grid1.doscroll(3). I would like to move my active row to the bottom row displayed on the grid (and vice versa when I do a page up). How can I reference the recno() of that bottom row (top row) of the displayed portion of the grid short of trying to figure out how many rows are displayed and SKIP # the number of times to move the pointer?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform