Hi..
I added a checkbox in a DataGrid using ItemRenderer. I have pasted the
code I am using below.
<mx:DataGrid id="dgEmployeeInfo" dataProvider="{resultArray}" x="131"
y="95" editable="false">
        <mx:columns>
            <mx:DataGridColumn headerText="Select"
rendererIsEditor="true" editorDataField="selected">
                <mx:itemRenderer>
                    <fx:Component>
                        <mx:HBox>
                            <s:CheckBox id="testChk"
click="testChk_clickHandler(event)"
selected="{cbSelected}">
                            </s:CheckBox>
                            <fx:Script>
                                <![CDATA[
                                    [Bindable]
                                    public var cbSelected:Boolean;
                                    protected function
testChk_clickHandler(event:MouseEvent):void
                                    {
                                        cbSelected =
testChk.selected;
                                    }
                                ]]>
                            </fx:Script>
                        </mx:HBox>
                    </fx:Component>
                </mx:itemRenderer>
            </mx:DataGridColumn>
            <mx:DataGridColumn headerText="First Name"
dataField="firstName"/>
            <mx:DataGridColumn headerText="Last Name"
dataField="lastName"/>
            <mx:DataGridColumn headerText="City" dataField="city"/>
            <mx:DataGridColumn headerText="Employee Code"
dataField="empCode"/>
        </mx:columns>
    </mx:DataGrid>
i also have a button outside the DataGrid, and when this button is
clicked, I want to delete all rows which have a checked CheckBox. Can
someone tell me how to do this?

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to