<?xml version="1.0"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" height="700" width="700">
<mx:Script>
<![CDATA[
[Bindable]
public var myDP:Array = [
{label1:"Order #2314", contact:"John Doe", quant:3, solddate:new Date(2005, 0, 1), Sent:1},
{label1:"Order #2315", contact:"Jane Doe", quant:3, solddate:new Date(2005, 0, 5), Sent:0}];
]]>
</mx:Script>
<mx:DataGrid id="myDG" dataProvider="{myDP}" variableRowHeight="true" width="500" height="250" editable="true">
<mx:columns>
<mx:DataGridColumn dataField="label1" headerText="Order #" editable="false"/>
<mx:DataGridColumn dataField="quant" headerText="Quantity" itemEditor="mx.controls.NumericStepper " editorDataField="value"/>
<mx:DataGridColumn dataField="solddate" headerText="Date" itemRenderer=" mx.controls.DateField" rendererIsEditor="true" editorDataField="selectedDate"/>
<mx:DataGridColumn dataField="Sent" rendererIsEditor="true" editorDataField="selected" textAlign="center">
<mx:itemRenderer>
<mx:Component>
<mx:Canvas width="100%" height="100%">
<mx:CheckBox selected="{Boolean(data.Sent)}" horizontalCenter="0" verticalCenter="0"/>
</mx:Canvas>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</mx:Application>
On 7/14/06, Shannon Hicks <[EMAIL PROTECTED]> wrote:
I have a dataGrid where I'd like to use a checkbox drop-in renderer/editor. My query returns two columns: name [varchar(45)] and featured [smallint]. Featured returns either 1 or 0.Now, in the dataGrid, my featured column looks like this:<mx:DataGridColumn headerText="Featured Image" dataField="featured" itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" editorDataField="selected" textAlign="center"/>First off... The checkbox doesn't show checked/unchecked according to the value of featured (1 or 0). Do I need to somehow convert 1 & 0 to boolean values? Isn't flash supposed to do this automatically?Secondly... The checkbox isn't centered. I'm not sure how to do that, as silly as it sounds.Shan
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.0/388 - Release Date: 7/13/2006
--
Jason __._,_.___
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- [flexcoders] dataGrid drop-in itemRenderer/Editor Shannon Hicks
- [flexcoders] Re: dataGrid drop-in itemRenderer/Ed... Tim Hoff
- Re: [flexcoders] dataGrid drop-in itemRenderer/Ed... Pan Troglodytes
- RE: [Junk E-Mail - MED] Re: [flexcoders] data... Shannon Hicks
- Re: [Junk E-Mail - MED] Re: [flexcoders] ... Anatole Tartakovsky
- Re: [Junk E-Mail - MED] Re: [flexcode... Pan Troglodytes
- Re: [Junk E-Mail - MED] Re: [fle... Anatole Tartakovsky
- RE: [Junk E-Mail - LOW] Re: ... Shannon Hicks
- Re: [Junk E-Mail - LOW] ... Anatole Tartakovsky
- RE: [Junk E-Mail - LOW] ... Shannon Hicks
- Re: [Junk E-Mail - LOW] ... Jeremy Lu
- Re: [flexcoders] dataGri... Tim Hoff
- Re: [flexcoders] dataGri... Anatole Tartakovsky
Reply via email to

