>hello everybody
>
>I have this code in the click event in a command button in a grid
>
>>public c_id
>>c_id = customer.customer_id
>>
>>thisform.grid1.SetAll("DynamicBackColor", ;
>>'IIF(customer.customer_id = c_id, RGB(255,255,255), RGB(0,255,0))', ;
>>"Column")
>>
>>thisform.grid1.SetAll("enabled", ;
>>IIF(customer.customer_id = c_id, .t., .f.), ;
>>"Column")
>>
>>thisform.refresh
>>return
>
>The dynamicbackcolor works but the enabled doesn't it either enables everything or disables everything
>can anybody explain / help
>
>Stephen McLaughlin
You can't treat a standard property like a Dynamic property. IOW, when using SetAll on the Enabled property, the expression is evaluated once, not dynamically. To do what you are trying to do, you'll need to put code in the AfterRowColChange event that enables/disables everything after it checks the value of customer.customer_id.
Erik Moore
Clientelligence