>>this.column4.DynamicBackColor = 'iif(duedate < DATE(),RGB(255,50,50),this.column4.DynamicBackColor)'
>
>Try this instead:
>this.column4.DynamicBackColor = 'iif(duedate < DATE(),RGB(255,50,50),'+this.column4.DynamicBackColor+')'
>
>This is assuming, that this.column4.DynamicBackcolor is already set to some expression resulting in a color.
That's exactly what I meant to suggest.
>If it get's too complex, maybe create a function in the form, that you call from DynamicBackcolor:
>this.column4.DynamicBackColor = 'thisform.columncolor(duedate)'
>
>* thisform.columncolor method:
>LPARAMETERS tdDueDate
>...
>Return RGB(...)
I've seen this used, even at framework level, but if the grid has a sufficient number of rows, method call overhead can make grid refreshes slow. Most probably nothing to worry about on today's machines, but just try that with debugger open... it won't matter whether you have the coffee ready, you'll have time enough to brew some.
The fastest trick I've found so far is to add an integer column, let's name it iColor, in the table, and to fill it with rgb() values as needed. Then the dynamic backcolor expresion becomes "alias.iColor" - works like a charm, and you can have as many different colors as you like.