Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid and funky reaction
Message
From
19/11/1999 08:48:45
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00292970
Message ID:
00292972
Views:
25
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform