Hi!
In the FAQ article where you took this code from there was:
with poColumn
...
.DynamicBackColor = "iif(recno('" + .parent.RecordSource +;
"')=this.nGridRecNo," + allt(str(lnColor))+ "," + allt(str(.BackColor)) + ")"
...
endwith
Do you see difference? This code is for column, not for grid.
>Hi Vlad,
>
>I was busy about another thing and just tried your Grid coloring codes in the FAQ session today, but it says:
>"Expression is invalid. Use a valid expression for DYNAMICFORECOLOR property."
>when I run the code, do you know why?
>
>Just using the same code from you:
>
>MyGrid.DynamicBackColor = "iif(recno('" + .parent.RecordSource +;
>"')=this.nGridRecNo," + allt(str(lnColor))+ "," + allt(str(.BackColor)) + ")"
>
>
>Jimi
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.