0

グリッドの外側にあるボタンがクリックされたときにデータグリッド データを削除する方法。

[Bindable]                 
        private var ac:ArrayCollection=new ArrayCollection([{artist: "John", album:"AAA", price:"100.01", selected: false}, 
            {artist: "Jai", album:"BBB", price:"101.01", selected: false}, {artist: "Jack", album:"CCC", price:"110.01", selected: false}]);
        <s:DataGrid id="myDG" width="50%" height="50%" dataProvider="{ac}"
        > 

    <s:columns>
        <s:ArrayCollection>

            <s:GridColumn dataField="artist" headerText="ARTIST"/>
            <s:GridColumn dataField="album" headerText="ALBUM"/>
            <s:GridColumn dataField="price" headerText="PRICE" >
                <s:itemEditor> 
                    <fx:Component> 
                        <s:ComboBoxGridItemEditor> 
                            <s:dataProvider>
                                <s:ArrayList>
                                    <fx:String>100</fx:String>
                                    <fx:String>200</fx:String>
                                    <fx:String>300</fx:String>
                                </s:ArrayList>
                            </s:dataProvider>
                        </s:ComboBoxGridItemEditor> 
                    </fx:Component> 
                </s:itemEditor>    
            </s:GridColumn>

        </s:ArrayCollection>
    </s:columns>
</s:DataGrid> 

グリッドの外にボタンが必要です。データはデータプロバイダーからのものです

4

2 に答える 2