if I can make it dance.
>>
>>You may want to use and array property for that, since INLIST() is limited with 24 items
>
>Hello Nick I want to employ the array method, but I am stuck with a small, but relavent question. The code that I am looking at sets the dynamicback color property of the column in the init of the grid. If I add an array property to the grid. I will be forced to use a statement like:
>
>.SETALL('DynamicBackColor', 'iif(ASCAN(THIS.PARENT.aRecNosSelected,RECNO()) > 0, ' + 'rgb(' + .cSelectedBackColor +'), ' + LTRIM(STR(.BACKCOLOR)) + ')',"column")
>
>This does not seem to work as I think the THIS.PARENT.aRecNosSelected is undefined in the init of the grid. So when the 'DynamicBackColor' is set the statement comes back as invalid. My guess is that when the 'DynamicBackColor' is set it evaluates it then and there, so the THIS.PARENT reference would not work.
>
>Any ideas?
Hello Bret,
The solution is here. :) What I found, that by some unknown reason DynamicBackColor expression didn't like
ASCAN(This.Parent.aRecNosSelected,RECNO()) > 0 in IIF expression, but it works
OK if you address it as:
ASCAN(thisform.Grid1.aRecNosSelected,RECNO()) > 0
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison