Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid formatting
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00186188
Message ID:
00186362
Views:
15
>*!*this does nothing at all
>THISFORM.Grid1.SetAll("Enabled", IIF(users.logyes,.F.,.T.), "Column")

This one will cause the expression to be evaluated only once; when the the staatement is issued. So if the current value of Users.LogYes is .T., all columns will be disabled.


>*!*this does nothing at all
>THISFORM.Grid1.SetAll("Enabled", !users.logyes, "Column")

Same as above.

>*!*this disables everything regardless of logyes value
>THISFORM.Grid1.SetAll("Enabled", users.logyes, "Column")

Same as above.

>*!*this works fine when setting the dynamicforecolor based on the same criteria
>THISform.grid1.SETALL("DynamicForecolor","IIF(users.logyes, ;
>RGB(255,0,0),RGB(0,0,255))","column")


You can solve this in a couple of ways. First, put code in the textbox's when event that conditionally returns false after evaluating users.logyes.

Second, put 2 textboxes in your column, one disables, and one enabled, and set your Column.DynamicCurrentCOntrol property like

THISFORM.Grid1.SetAll("DynamicCurrentControl", "IIF(Users.Logyes, 'txtDisabled', 'txtEnabled')", "Column")
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform