>thisform.grid1.column2.DynamicForeColor = IIF(MOD(tbltest.nid,2)=0,'RGB(254,0,0)','RGB(255,255,255)')
>
>i put this code, in the init of the grid, afterrow and beforerow,
>
>i do note, that it takes effect only after you move thru the records and it inherents the last color on the next record before it shows its real color when you move away again
>
>>You have to set Dynamic* property only ones. Keep in mind that it has to be expression that will be evaluated later. If it's evaluated at the time >of assignment than it'll not be dynamic. Could you post related code from the Init?
>
>>But it doesn't seem to work in INIT, and its late on afterrow, beforerow properties? any idea?
Paul,
Your expression is incorrect. It should be
thisform.grid1.column2.DynamicForeColor = [IIF(MOD(tbltest.nid,2)=0,RGB(254,0,0),RGB(255,255,255))]
In your original expression you put quotes in the wrong places.
Also, you need to set it up only once (you can do it in grid's Init).
If it's not broken, fix it until it is.
My Blog