You're absolutely right! Being a newbie at this I originally connected
to my local XML files using HTTPService request without the e4x format
and this worked fine. After I discovered I didn't need to do this, I
moved to XML tags with e4x formatting and ran into the problem.
BTW, I tried selected='{Boolean(data.cdrBusinessCharge)}' and that did
not work.
Thanks again to all for the input.
Jack
>
> BTW, this seems to be an issue only with XML/e4x dataProviders. When I
> used standard ArrayCollections (coming from an XML HTTPService call),
> the litteral text "true" and "false" will be cast boolean automatically.
> I had a working grid with checkboxes, and when I changed to e4x I ran
> into the same issue.
>
>
> --- In [email protected], "Tracy Spratt" <tspratt@> wrote:
> >
> > 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]
> > <mailto:flexcoders%40yahoogroups.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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/