>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