thisform.grd1.column2.DynamicBackColor='iif(field='xxx',RGB(255,64,64),RGB(255 ,255 ,255 ))' thisform.grd1.column2.SPARSE=.F. thisform.grd1.refresh()Please note that this is ALL the code you need in the command button. And don't change the first line, except for other color values!
>select crsrgrd >scan > if alltrim(crsrgrd.field)='xxx' > thisform.grd1.column2.dynamicbackcolor='rgb(125,112,23)' > thisform.grd1.column2.SPARSE=.F. > thisform.grd1.refresh() > endif >endscan>When I click all the column color changed.