General information
Category:
Coding, syntax & commands
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.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only