Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This Grid problem have inefficient solutions only ?
Message
De
28/04/2004 08:46:45
Walter Meester
HoogkarspelPays-Bas
 
 
À
28/04/2004 07:11:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00898867
Message ID:
00898889
Vues:
10
Hi Fabio,

I've not tried it, but you might want to (mis)use the dynamicBackColor (or any other Dynamic Propery) to do this.

When you do a refresh of the grid the command stored in that property is evaluated from the top row to the bottom.

THISFORM.Init
THISFORM.Grid.Column1.DynamicBackColor = "THISFORM.GetFirstRow(RECNO('YourCursorSource'))"
THISFORM.GetFirstRow
LPARAMETER nRecno

IF EMPTY(THISFORM.FirstRow)
   THISFORM.FirstRow = nRecno
ENDIF
RETURN RGB(255,255,255)
THISFORM.Grid.Refresh
THISFORM.FirstRow = 0
All you have to do now is a
THISFORM.Grid.Refresh
to get your first row

As I said, I never tried it, but it might work.

Walter,


>Problem:
>
>I want know this ( like a FirstRow property ):
>
>the Recno(grid.RecordSource) that occupies the first row of the grid visible area
>

>
>
>a) grid is not active, and i cannot change the focus
>
>
>I found no solutions.
>
>
>b) Focus on grid and grid have the Active row out of Rows visible Area.
>
>
>I found a solution with ActivateCell(1,m.this.ActiveColumn)
>
>
>c) Conditions b) and without move the record bookmark
>
>
>I have found only a linear search with DoScroll,
>but the direction it is unknown, then the search is very inefficient.
>
>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform