Information générale
Catégorie:
Codage, syntaxe et commandes
Thanks I will try those. BTW, the expression invalid was my fault. I had left code in the click event of the page (thinking that was where I needed to make changes), and forgot I had it there. Sigh...
>>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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement