>Public oForm >oForm = Createobject('myForm') >oForm.Show > >Define Class myForm As Form > DataSession = 2 > Height=500 > Width=600 > > Add Object cmdSetColor As CommandButton With Caption = "Set Color" > Add Object myGrid As Grid With Top=50,Height=450,Width=600 > > Procedure Load > Set Multilocks On > Use (_samples+'data\orditems') > CursorSetProp("Buffering",5,'orditems') > Endproc > > Procedure cmdSetColor.Click > Local lcCS > With This.Parent.myGrid > For Each loColumn In .Columns > lcCS = loColumn.ControlSource > If Type(m.lcCS) = 'N' > loColumn.DynamicBackColor = ; > 'IIF('+ m.lcCS + ' < 10, RGB(225, 128, 128), RGB(128,255,128))' > Endif > Endfor > .Refresh > Endwith > Endproc >Enddefine >Cetin