On Mon, Dec 22, 2008 at 10:42 PM, jmsavoy <[email protected]> wrote:
> I have a checkbox as an itemrenderer in a datagrid as follows:
>
> <mx:itemRenderer>
> <mx:Component>
> <mx:CheckBox click="data.Sent=!data.Sent"
> selected="{data.Sent}"/>
> </mx:Component>
> </mx:itemRenderer>
> The value "Sent" is a text string either "true" or "false". However, the
> checkbox is always checked, regardless of the value of "Sent" being "true"
> or "false".
<mx:Component>
<mx:CheckBox click="data.Sent=!data.Sent"
selected="{data.Sent == 'true'}"/>
</mx:Component>
You'll have to compare with the actual string "true" (as pointed out
by valdhor), because any non-empty string evaluates to true in AS3.
--
http://manishjethani.com/