RE: [flexcoders] Re: datagrid checkboxes getting checked dynamically

2006-10-26 Thread Tracy Spratt












Just for fun, try a cast:

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

Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jack OMelia
Sent: Wednesday, October 25, 2006
4:39 PM
To: flexcoders@yahoogroups.com
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
  cdrBusinessChargetrue/cdrBusinessCharge
  cdrSumNbr203-952-4993/cdrSumNbr
  cdrSumTotalCalls12/cdrSumTotalCalls
  cdrSumTotalMin21/cdrSumTotalMin
  cdrSumTotalAir0.00/cdrSumTotalAir
  cdrSumTotalLD0.00/cdrSumTotalLD
  cdrSumTotalCharges0.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 
   
 

  




__,_._,___






[flexcoders] Re: datagrid checkboxes getting checked dynamically

2006-10-26 Thread iko_knyphausen

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 flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Just for fun, try a cast:

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

 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Jack OMelia
 Sent: Wednesday, October 25, 2006 4:39 PM
 To: flexcoders@yahoogroups.com
 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 flexcoders@yahoogroups.com
 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
   cdrBusinessChargetrue/cdrBusinessCharge
   cdrSumNbr203-952-4993/cdrSumNbr
   cdrSumTotalCalls12/cdrSumTotalCalls
   cdrSumTotalMin21/cdrSumTotalMin
   cdrSumTotalAir0.00/cdrSumTotalAir
   cdrSumTotalLD0.00/cdrSumTotalLD
   cdrSumTotalCharges0.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/
 



[flexcoders] Re: datagrid checkboxes getting checked dynamically

2006-10-26 Thread ben.clinkinbeard
Not surprising. XML is (obviously) just plain text when it comes down
to it. I'm not sure how you're creating your ArrayCollection from the
data returned by your HTTPService, but it probably serializes
everything into generic objects and primitive datatypes where
appropriate. That is exactly what setting resultFormat to object does.

Ben


--- In flexcoders@yahoogroups.com, iko_knyphausen [EMAIL PROTECTED] wrote:

 
 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 flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
 
  Just for fun, try a cast:
 
  selected='{Boolean(data.cdrBusinessCharge)}'
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On
  Behalf Of Jack OMelia
  Sent: Wednesday, October 25, 2006 4:39 PM
  To: flexcoders@yahoogroups.com
  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 flexcoders@yahoogroups.com
  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
cdrBusinessChargetrue/cdrBusinessCharge
cdrSumNbr203-952-4993/cdrSumNbr
cdrSumTotalCalls12/cdrSumTotalCalls
cdrSumTotalMin21/cdrSumTotalMin
cdrSumTotalAir0.00/cdrSumTotalAir
cdrSumTotalLD0.00/cdrSumTotalLD
cdrSumTotalCharges0.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/
 



[flexcoders] Re: datagrid checkboxes getting checked dynamically

2006-10-26 Thread Jack OMelia
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 flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
 
  Just for fun, try a cast:
 
  selected='{Boolean(data.cdrBusinessCharge)}'
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On
  Behalf Of Jack OMelia
  Sent: Wednesday, October 25, 2006 4:39 PM
  To: flexcoders@yahoogroups.com
  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 flexcoders@yahoogroups.com
  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
cdrBusinessChargetrue/cdrBusinessCharge
cdrSumNbr203-952-4993/cdrSumNbr
cdrSumTotalCalls12/cdrSumTotalCalls
cdrSumTotalMin21/cdrSumTotalMin
cdrSumTotalAir0.00/cdrSumTotalAir
cdrSumTotalLD0.00/cdrSumTotalLD
cdrSumTotalCharges0.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/
 



[flexcoders] Re: datagrid checkboxes getting checked dynamically

2006-10-25 Thread ben.clinkinbeard
 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 flexcoders@yahoogroups.com, Jack OMelia [EMAIL PROTECTED] 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
   cdrBusinessChargetrue/cdrBusinessCharge
   cdrSumNbr203-952-4993/cdrSumNbr
   cdrSumTotalCalls12/cdrSumTotalCalls
   cdrSumTotalMin21/cdrSumTotalMin
   cdrSumTotalAir0.00/cdrSumTotalAir
   cdrSumTotalLD0.00/cdrSumTotalLD
   cdrSumTotalCharges0.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/
 



[flexcoders] Re: datagrid checkboxes getting checked dynamically

2006-10-25 Thread Jack OMelia
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 flexcoders@yahoogroups.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
cdrBusinessChargetrue/cdrBusinessCharge
cdrSumNbr203-952-4993/cdrSumNbr
cdrSumTotalCalls12/cdrSumTotalCalls
cdrSumTotalMin21/cdrSumTotalMin
cdrSumTotalAir0.00/cdrSumTotalAir
cdrSumTotalLD0.00/cdrSumTotalLD
cdrSumTotalCharges0.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/