>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
Jimi,
MyGrid.DynamicBackcolor ? Is it a custom property ?
What does .parent.recordsource refer ?
Try :
MyGrid.SetAll('DynamicBackColor', ;
"iif(recno(this.Recordsource)=this.nGridRecNo," + ;
allt(str(lnColor))+ "," + allt(str(.BackColor)) + ")",'Column')
Assuming nGridRecNo is a custom property of grid.
Also would need some fix in a few other methods but I think they're there already.
Cetin