This grid was a class, based on a MemberClass (whatever the hell that is) and the Refresh was setting the BackColor for the rows. Even when I put a NODEFAULT into the Refresh of the instance, it still would not work. I replaced the grid with the Foxpro default one and it works fine. Thanks for getting me to look elsewhere other than the obvious places (to me anyway).
>Do you have your cursor available in form's Load? Can you specify the alias in the Property sheet for the grid (e.g. comment out first 2 lines in your code) and also just in case comment out the last line?
>
>See if this helps. Also check if you have any extra code in Form's Refresh or have timer running.
>
>>In the form's INIT.
>>
>>>Where did you put this code? Can you verify that at the moment the form is activated the DynamicBackColor is still correct? Put it in Debugger Watch window or just add a messagebox with it.
>>>
>>>>I like that code, but the records still do not change color. The logic seems correct - I pulled it out and ran it against the actual cursor in the command window - but the grid does not seem to be affected.
>>>>
>>>>This is the full block I'm using:
>>>>
>>>> .Fm_CONTAINER1.grdWorkListXMLCursor.RecordSource = ''
>>>> .Fm_CONTAINER1.grdWorkListXMLCursor.RecordSource = 'WorkListXMLCursor'
>>>> TEXT TO lcDynBackColor NOSHOW PRETEXT 15
>>>> ICASE(UPPER(ALLTRIM(WorkListXMLCursor.GroupHeading)) == [RECEIVER] , RGB(192, 241, 190),
>>>> INLIST(UPPER(ALLTRIM(WorkListXMLCursor.GroupHeading)), [SUBSCRIBER], [DEPENDENT]), RGB(211, 210, 240),
>>>> RGB(249, 223, 223))
>>>> ENDTEXT
>>>> .Fm_Container1.grdWorkListXMLCursor.SetAll([DynamicBackColor], lcDynBackColor, [Column])
>>>> .Fm_CONTAINER1.grdWorkListXMLCursor.Refresh
>>>> .Fm_Container1.grdWorkListXMLCursor.Top = 181
>>>> .Fm_Container1.grdWorkListXMLCursor.Left = 15
>>>> .Fm_Container1.grdWorkListXMLCursor.Height = 236
>>>> .Fm_Container1.grdWorkListXMLCursor.Width = 660
>>>> .Fm_Container1.grdWorkListXMLCursor.zorder(0)
>>>>
>>>>