Hello Gloria.
i've tried to put it in 'grid.init' but it didn't work nicely.I use that same code in the init of my grid and it works just fine. What problem did you have with it?
anyway, my 'lselected' field is a numeric field and i filled it with 0... am i in the right way?Then the code should look like this:
This.SetAll( 'DynamicForeColor', ;
'IIF( lSelected = 1, RGB( 0, 0, 128 ), RGB( 0, 0, 0 ) )', 'COLUMN' )
This.SetAll( 'DynamicBackColor', ;
'IIF( lSelected = 1, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )