The sample on LiveDocs seems to work for me, I assume you're talking
about this one:
http://livedocs.macromedia.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=cellrenderer_072_17.html
You first said you tried just using the CheckBox as a drop-in item
renderer. But the code line you wrote didn't quite match the LiveDocs
example. Does the following line work?
<mx:DataGridColumn dataField="idDoctoEnvio"
itemRenderer="mx.controls.CheckBox" rendererIsEditor="true"
editorDataField="selected" />
You're really saying that that doesn't work? Can you cut and paste the
sample from LiveDocs and have that work?
Doug
dmiramontesval wrote:
Nope doesn't work either, on each attempt it didn't even show the
CheckBox inside the DataGrid, it displayed the normal text, as if no
render was being used.
Any other ideas?
--- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>, "James T. Riffe" <[EMAIL PROTECTED]>
wrote:
>
> Try this:
>
> <mx:DataGridColumn
> headerText="Dropship" dataField="dropship" textAlign="center" width="40"
> editable="false">
>
>
> <mx:itemRenderer>
>
>
> <mx:Component>
>
>
> <mx:VBox horizontalAlign="center">
>
>
> <mx:CheckBox click="data.dropship=!data.dropship"
> selected="{data.dropship}" />
>
>
> </mx:VBox>
>
>
> </mx:Component>
>
>
>
> </mx:itemRenderer>
>
> </mx:DataGridColumn>
>
>
>
> From: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>] On
> Behalf Of dmiramontesval
> Sent: Tuesday, February 13, 2007 5:35 PM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Using CheckBox as ItemEditor
>
>
>
> I am having troubles while using a CheckBox control inside a
> DataGridColumn as an itemEditor.
>
> First i tried this:
>
> <mx:DataGridColumn dataField="idDoctoEnvio" headerText=" "
> itemEditor="mx.controls.CheckBox" editorDataField="selected" editable
> = "true"/>
>
> And it didn't work, so i tried this instead:
>
> <mx:DataGridColumn dataField="idDoctoEnvio" headerText=" "
> editable="true" rendererIsEditor="true"
> itemEditor="com.legosoft.mxml.ItemEditorCheckBox"
> editorDataField="cbSelected" width="45"/>
>
> where ItemEditorCheckBox is:
>
> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml>">
> <mx:CheckBox id="editorCB" height="100%" width="100%"
> selected="{data.FollowUp}"
> click="cbSelected=editorCB.selected"
> updateComplete="cbSelected=editorCB.selected;"/>
>
> <mx:Script>
> <![CDATA[
> [Bindable]
> public var cbSelected : Boolean;
> ]]>
> </mx:Script>
> </mx:VBox>
>
> And that didn't work either, so what's the deal here? How can i use a
> CheckBox control as an itemEditor?
>
> By the way, both attempts to make this work were taken from the Flex
> Developer's Guide.......it was supposed to be working, i mean its on
> the dev guide, right?
>