No Barbara, I didn't. I suspect it would work but I don't want to give the focus to the grid. I just want to display the data.
Eric.
>I don't know why (will try to check it out later) but have you tried a grid.SetFocus()?
>
>>This works perfectly well but how can we explain the 2 colors effects only appears when the user go on the grid. When I only display the grid, all the content appears ok but no 2 colors. Strange? (I tried to put it in refresh as well but no chance).
>>
>>>Eric,
>>>Use "ActiveRow" not "RelativeRow". ActiveRow is always the same for a given set of records (First record whether indexed or not is 1, next record is 2, etc.).
>>>
>>>Barbara
>>>
>>>
>>>>
>>>>Didn't work:
>>>>
>>>>I put this in the grid.init method. Comes out as RGB(255,255,255) for each row. As a test: RECNO() works fine but of course bring me back to the first question.
>>>>
>>>>Maybe the rows are not define at this time?
>>>>
>>>>THIS.SetAll("DynamicBackColor", ;
>>>> "IIF(MOD(THIS.RelativeRow, 2)=0, RGB(255,255,255) ;
>>>> , RGB(128,255,255))", "Column") && Alternate white and green records
>>>>
>>>>*THIS.SetAll("DynamicBackColor", ;
>>>>* "IIF(MOD(RECNO(), 2)=0, RGB(255,255,255) ;
>>>>* , RGB(128,255,255))", "Column") && Alternate white and green records