Is the field "active" in dataCollection a string or Boolean. If it is a
string, does it contain true or false as values(case is important). If it
is a boolean, the line should be changed as
<mx:CheckBox selected="{data.active}"/>
Jay Jayaraman
Central Billing Services
Financial Management and Planning
(404) 498-8453 (W)
(404) 273-7131 (C)
"Frank Griffin" <[email protected]>
Sent by: [email protected]
01/23/2009 09:12 AM
Please respond to
[email protected]
To
<[email protected]>
cc
Subject
[AFFUG Discuss] Checkbox in a DataGrid Column
I am new to Flex and I am having problems making my CheckBox work in a
DataGrid Column. I had this working when I was not using a bound XML array
but now that I have changed to a bound VAR my CheckBox no longer works. I
have both used a ?selected=? statement and not used it with the same
result.
Any guidance would be much appreciated!
Thanks,
Frank
My array:
[Bindable]
private var dataCollection:ArrayCollection= new ArrayCollection();
My DataGrid with CheckBox:
<mx:DataGrid id="dG1"
dataProvider="{dataCollection}"
change="dataGridChange()" width="100%">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name" width="
225" />
<mx:DataGridColumn dataField="active" headerText="Active"
width="50" textAlign="center">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox selected="{data.active == 'true'}"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="seq" headerText="Seq#" width="40
" />
</mx:columns>
</mx:DataGrid>
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in
the subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------