>>>ThisForm.Grid1.Column7.Text1.BackColor = 65535 (this does not work)
>>>vs.
>>>ThisForm.Grid1.Column7.BackColor = 65535 (this does work)
>>>
>
>>Then use the dynamicbackcolor property instead
>>You can set that to something like iif(empty(myfield),red,white)
>>(pseudo vfp)
>
>I can not do that way. I have buch of codes in a function, so I need to have it like the first two codes. If there is another way to get the cell to change the color, then that would be great.
You can use dynamicBackColor the way Ko said, based on a special field on your cursor. Just make all your validation code change that field to indicate if the row is valid or not. If you want to do this field by field, you can add many "valid fields" or just a single string field with a character flag for each "real field".
Hope this helps.