>for each oColumn in this.Columns > with oColumn > .DynamicBackColor = 'iif(inlist('+; > str(.ColumnOrder)+',1,5,7) or type('+; > .ControlSource+') = "C", rgb(255,255,0), rgb(0,255,255))' > endwith >endfor >Would set columns with 'ColumnOrder' 1,5,7 or field char type to yellow and rest cyan (full column setting). If you need you could add rowwise limitations too.
* Assuming color determining method is in grid class >for each oColumn in this.Columns > oColumn.DynamicBackColor = '(this.SetColor("'+oColumn.Controlsource+'"))' >endfor > >*SetColor >lparameters tcControlsource && At runtime this method would get controlsource >if tcControlsource is something >if eval(tcControlsource) is some value >etc >Please note that this is much different from SetAll.