>Justok,
>First the expression is wrong. You must put the whole expression as a char string :
.DynamicBackColor = "IIF(Empty(myTable.Field1),rgb(0,0,0),rgb(192,192,255))"
Next, to make the life easier for you, you could delegate the coloring to a function :
>for each oColumn in ThisForm.Grid1.columns
> oColumn.DynamicBackColor = "GimmeColor(["+oColumn.Controlsource+"])"
>endfor
Your function would then return a color based on controlsource.
>Cetin
Thanks both of you!
What happen if I pass "This.name" inside setall() function?
Thisform.grd1.SetAll("Caption", "This.Name", "Header")
grd1.name or header1.name ?!
if use header1.name, I can do:
Thisform.grd1.SetAll("DynamicBackColor", "Thisform.GimmeColor(This.ColumOrder)", "Column")
^_~
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.