>>>Simple grid problem that's driving me nuts. I'm trying to disable a column in my grid if a logical field (users.logyes) is .T. I can't get the enabled property to behave. The error I'm getting is "data type is invalid for this property. Any ideas?
>>>
>>>llenabled = 'IIF(users.logyes,.F.,.T.)'
>>>THISFORM.grid1.SETALL("enabled",llenabled,"column")
>>>
>>>Thanks,
>>>
>>>John.
>>
>>Suggest you replace llenabled with EVAL(llenabled) in SetAll(). As written it's trying to stuff a string into a logical property.
>
>Or, on second thought, lose the variable assignment bit altogether. Why not just THISFORM.Grid1.SetAll("Enabled", NOT Users.LogYes, "Column") (or put your IIF() in there if you feel you must).
>
>HTH,
>Rich
Hi Rich,
I've tried these so far but no luck.
*!*this does nothing at all
THISFORM.Grid1.SetAll("Enabled", IIF(users.logyes,.F.,.T.), "Column")
*!*this does nothing at all
THISFORM.Grid1.SetAll("Enabled", !users.logyes, "Column")
*!*this disables everything regardless of logyes value
THISFORM.Grid1.SetAll("Enabled", users.logyes, "Column")
*!*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")
I'm still stumped, and I know I've done this before on another grid. I guess I've slept to many nights since then.
John.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only