Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making grid highlighting match the current record
Message
De
09/04/1998 10:47:28
 
 
À
09/04/1998 10:08:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00090597
Message ID:
00090774
Vues:
28
>>I have a data entry form on Page 1. On page 3 I have a grid. I have some code in the grid init which highlights the current row when I click on the grid. But I'd also like the correct row in the grid to be selected when I go to Page 1 and select a record, then click on Page 3. I thought I should do this in the click event for Page 3, but I'm not sure if anything I reference in the grid at that point is valid since when I click on the page I'm not actually in the grid. Does anybody have any hints or tips with this?
>>
>>Thanks,
>>
>>Sylvia
>
>Could you post actual code you use for DynamicBackColor setting?

***This is the code which is in my Grid Init event
ThisForm.r_nCurrentRow = RECNO(This.RecordSource)
This.Setall("DynamicBackColor", ;
"IIF(RECNO(This.Recordsource) = " + ;
"ThisForm.r_nCurrentRow, " + ;
"RGB(0,255,255), RGB(255,255,255))", ;
"Column")

***In the When event of each item contained in the grid column, I have
ThisForm.r_nCurrentRow = RECNO(This.Parent.Parent.RecordSource)

I thought by putting a variation of this into my Click event on the Page, I could update the grid 'marker' as soon as I clicked on the page. But the marker remains 'stuck' on the first item.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform