Just for fun, try a cast:

selected='{Boolean(data.cdrBusinessCharge)}'

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jack OMelia
Sent: Wednesday, October 25, 2006 4:39 PM
To: [email protected]
Subject: [flexcoders] Re: datagrid checkboxes getting checked dynamically

 

That did the trick! Many thanks! I knew there must be a way to give
the checkbox the boolean data but couldn't see it.
Thanks again.
>
> > Is it because the checkbox is expecting a Boolean and getting text?
> That would be my guess. What does it do if you change the code to:
>
> <mx:CheckBox id="ckBoxBusCharge" selected='{data.cdrBusinessCharge ==
> "true"}' />
>
> ?
>
> --- In [EMAIL PROTECTED]ups.com, "Jack OMelia" <lomelia@> wrote:
> >
> > Hi All,
> >
> > I have one column in a datagrid populated with checkboxes. The
> > checkboxes are part of a dataGridCell itemRenderer called
> > "checkBoxRendererSummary":
> >
> > <mx:Component id="checkBoxRendererSummary" >
> > <mx:VBox horizontalAlign="center" paddingLeft="10">
> > <mx:CheckBox id="ckBoxBusCharge"
> > selected='{data.cdrBusinessCharge}' />
> > </mx:VBox>
> > </mx:Component>
> >
> > and receive data from a local XML file. The XML file is brought in
> > with the <mx:XML/> tag formatted for e4x. One node of the XML is
below:
> >
> > <item>
> > <cdrBusinessCharge>true</cdrBusinessCharge>
> > <cdrSumNbr>203-952-4993</cdrSumNbr>
> > <cdrSumTotalCalls>12</cdrSumTotalCalls>
> > <cdrSumTotalMin>21</cdrSumTotalMin>
> > <cdrSumTotalAir>0.00</cdrSumTotalAir>
> > <cdrSumTotalLD>0.00</cdrSumTotalLD>
> > <cdrSumTotalCharges>0.00</cdrSumTotalCharges>
> > </item>
> >
> > For some reason, the checkbox does not read the value of
> > cdrBusinessCharge and check the box accordingly. No matter whether the
> > value is true or false, all the checkboxes are checked. I use similar
> > itemRenderers for the other columns with Text components instead of
> > checkboxes and they all read and display the data correctly. Is it
> > because the checkbox is expecting a Boolean and getting text?
> >
> > Thanks
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to