Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set grid row of current record without setting focus
Message
From
19/09/2001 13:05:49
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00558234
Message ID:
00558413
Views:
61
Nadya,

hmmm... This code looks familiar.

Walter,


>Here is the working method from our grid class. I got it from here, but unfortunately, don't remember, from whom:
>
>
>*--------------------------------------------------------------------------
>* -- NSL 3/2/00
>* -- Added this method per Nadya's request
>* -- It is not automatically called but is available if the user would like to use.
>* -- It is intended to be called on return from the search button to place the intended record
>* -- at the top of the grid.
>*--------------------------------------------------------------------------
>
>thisform.lockscreen=.t.
>nHeight = this.height
>this.height = this.headerheight + this.rowheight
>this.refresh
>this.height=nHeight
>thisform.lockscreen=.f.
>
>>Hello,
>>
>>I have a grid with a cursor as record source. When I seek a record and the grid is displayed
>>the current record is somewhere in the middle of the grid.
>>The property RelativeRow contains the number of the active row. So it would be possible e.g.
>>to do a DoScroll to move the active row to the top (there are some articles and FAQ about
>>this topic). Unfortunately the property RelativeRow is only filled, if the grid gets the focus. So
>>a Setfocus() is neccesary.
>>
>>I wonder if there is a possibility to determine that the active row in the cursor is shown at
>>the top without using relative row and setfocus.
>>
>>The weird thing is that after filling the cursor and deleting all records and refilling it, after a seek the
>>current record is shown at the top of the grid (visible part - relativerow=1 - for any record).
>>To avoid a high number of deleted records after a lot of refreshs I would like to use ZAP. But in this case
>>the grid behaves the way described above (current record in the middle of the grid).
>>
>>Thanks in advance
>>
>>Andreas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform