Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set grid row of current record without setting focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00558234
Message ID:
00558312
Vues:
27
This message has been marked as the solution to the initial question of the thread.
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
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform