Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making grid highlighting match the current record
Message
De
09/04/1998 13:36:17
 
 
À
09/04/1998 13:11:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00090597
Message ID:
00090856
Vues:
31
>When I added the code you suggested (and took out the When event code), I got the following message (5 times which is the number of columns I have): "Expression invalid. Use a valid expression for DynamicBackColor property." Everything looks ok, when the grid first displays (i.e. it still shows the highlighting on the first column), but the error message displays as soon as I try to exit from the displayed first row and click on another row in the grid.
>
Following are Grid Snippets which are really tested and work Ok on my machine:
***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")
***Grid.Afterrowcolchange event
LPARAMETERS nColIndex
thisform.r_nCurrentRow=RECNO(This.RecordSource)
this.refresh
Normally I don't use RECNO(This.RecordSource). I prefer RECNO("Table1"), etc., but I wanted to be close to your code and it really works.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform