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:[EMAIL PROTECTED] On
Behalf Of dmiramontesval
Sent: Tuesday, February 13, 2007 5:35 PM
To: flexcoders@yahoogroups.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";>
<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?

 

Reply via email to