Based on your example....it works....

<mx:DataGridColumn headerText=" " width="150" dataField="isSelected"  
<mx:itemRenderer>                                       
<mx:Component>
<mx:HBox horizontalAlign="center"
 backgroundAlpha="100"  >
<mx:Script>
<![CDATA[
public var selected:Boolean;
]]>
</mx:Script>                  
<mx:CheckBox id="cb" selected="{data.isSelected}"
 click="selected=data.isSelected=cb.selected;"  />
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>

Thank you, 

Precia




--- In [email protected], "John Zhao" <[EMAIL PROTECTED]> wrote:
>
> Try this as the ItemRenderer instead.
>  
> <mx:Component className="inlineCB">
>                   <mx:HBox horizontalAlign="center"
> backgroundAlpha="100"  >
>                    <mx:Script>
>                     <![CDATA[
>                      public var selected:Boolean;
>                     ]]>
>                    </mx:Script>                  
>                    <mx:CheckBox id="cb" selected="{data.isSelected}"
> click="selected=data.isSelected=cb.selected;"  />
>                   </mx:HBox>
>                   </mx:Component>
>  
> -John
> 
> 
> ________________________________
> 
>       From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of app.developer
>       Sent: Thursday, November 02, 2006 10:53 AM
>       To: [email protected]
>       Subject: [flexcoders] Checkbox in Datagrid - checks disappear
> when scrolling
>       
>       
> 
>       If I use
>       
>       <mx:Component id="inlineEditor"> 
>       
>       <mx:Canvas width="100%" height="100%"> 
>       <mx:Script>
>       <![CDATA[
>       public var value:uint; 
>       ]]>
>       </mx:Script>
>       <mx:CheckBox id="checkbox" selected="{Boolean
(data.isSelected)}"
> 
>       horizontalCenter="0" verticalCenter="0"/>
>       <mx:Binding source="checkbox.selected" destination="value"/>
>       </mx:Canvas> 
>       
>       </mx:Component>
>       
>       ....for the DataGridColumn....
>       
>       <mx:DataGridColumn dataField="isSelected"
> rendererIsEditor="true" 
>       editorDataField="value" textAlign="center" 
>       itemRenderer="{inlineEditor}"/>
>       
>       ....the selected checkboxes are not selected if a scroll 
through
> the 
>       dataGrid. Has anyone had this problem and solved it?
>       
>       Precia
>





--
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/
 

Reply via email to