>I need to change the schedule grid into different dynamic color
>according each column value.
>
>i.e. Column1.DynamicBackColor = IIF(Empty(myTable.Field1), "0,0,0", "192,192,255")
>Column2.DynamicBackColor = IIF(Empty(myTable.Field2), "192,192,0", "192,255,192")
>...
>
>I wonder that I can assign the DynamicBackColor of Each Column in
>Character type, but the BackColor DO NOT Change as I want!!!
>
>I know if the whole grid change all Columns into appointed color by
>Setall() in example.
>
>But I need to set each column, I can't use the SetAll Function!
>SetAll function is appointing the RGB() value but DynamicBackColor of each Column is character.
>
>What Can I do?! ~~>-<~~
>
>Thanks for help!!
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