0

私のコードでは、データグリッドは datachanged イベントを発生させません。誰かが私が間違っている場所を見つけるのを手伝ってくれますか? ヘルプのために、コードを以下に示します。

                       <mx:DataGrid id="userlist" 
                                 horizontalGridLines="true"
                                 horizontalGridLineColor="0xeeeeee"
                                 dataChange="dataChanged();" 

                                 editable="true" 
                                 change="changegrid(event);" 
                                 width="100%" 
                                 height="250" borderColor="#FF0000" borderStyle="solid"  
                                 borderThickness="1"> 

                    <mx:columns >
                        <mx:DataGridColumn dataField="User" editable="false" headerText="User" />
                        <mx:DataGridColumn dataField="cam" editable="true" width="24" itemEditor="mx.controls.CheckBox" editorDataField="cam" textAlign="center" headerText="M"> 
                            <mx:itemRenderer>
            <mx:Component >
                               <mx:Box horizontalAlign="center" verticalAlign="middle" height="100%" width="100%">
                                    <mx:CheckBox id="chb" click="data.cam=!data.cam" selected="{data.cam}"/>
                                </mx:Box>
            </mx:Component>
                            </mx:itemRenderer>
                            <mx:headerRenderer>
                            <mx:Component>
                                <mx:Image width="16" height="16" toolTip="Change Cam Status" source="@Embed(source='icons/webcam_start.png')" verticalAlign="middle" horizontalAlign="center"/>
                            </mx:Component>
                            </mx:headerRenderer>
                        </mx:DataGridColumn>
                        <mx:DataGridColumn dataField="mic" editable="false" itemEditor="mx.controls.CheckBox" editorDataField="mic"  width="24" textAlign="center" headerText="C">
                            <mx:itemRenderer>
            <mx:Component >
                               <mx:Box horizontalAlign="center" verticalAlign="middle" height="100%" width="100%">
                                    <mx:CheckBox id="chb1"  click="data.mic=!data.mic" selected="{data.mic}" />
                                </mx:Box>

            </mx:Component>
                            </mx:itemRenderer>                                
                            <mx:headerRenderer>
                            <mx:Component>
                                <mx:Image width="16" height="16" toolTip="Change Microphone Status " source="@Embed(source='icons/microphone_plus.png')" verticalAlign="middle" horizontalAlign="center"/>
                            </mx:Component>
                            </mx:headerRenderer>                                
                        </mx:DataGridColumn>
                        <mx:DataGridColumn dataField="sound" editable="false" itemEditor="mx.controls.CheckBox" editorDataField="sound" width="24" textAlign="center" headerText="R1"> 
                            <mx:itemRenderer>
            <mx:Component >
                               <mx:Box horizontalAlign="center" verticalAlign="middle" height="100%" width="100%">
                                    <mx:CheckBox id="chb2" click="data.sound=!data.sound" selected="{data.sound}"/>
                                </mx:Box>

            </mx:Component>
                            </mx:itemRenderer>                                
                            <mx:headerRenderer>
                            <mx:Component>
                                <mx:Image width="16" height="16" 
    toolTip="Turn Sound on/off " source="@Embed(source='icons/audio_volume_high.png')"       verticalAlign="middle" horizontalAlign="center"/>
                            </mx:Component>
                            </mx:headerRenderer>                            
                        </mx:DataGridColumn>
                    </mx:columns>

                   </mx:DataGrid>

私は次のデータを使用しています private var plist:ArrayList = new ArrayList( [{User:'Ravi Kanchan Sharma', cam:true, mic:true, sound:true}, {User:'Vijay Anand Sharma', cam:true , mic:false, sound:true}, {User:'Yogender Kumar Sharma', cam:false, mic:true, sound:true}]);`

4

1 に答える 1