ThaLyric
%Europe/Berlin %563 %2007, 13:32
Hoi,
Ik heb 2 datagrids. Ik kan items van DG1 naar DG2 drag and droppen. Probleem is nu dat ik dus een item die ik al een x eerder heb gedropped vanuit DG1 naar DG2 meerdere keren kan dropen. En dat wi lik eigenlijk niet. Normaal zou je dan de item uit DG1 verwijderen, maar dat wil ik dus niet. Iemand een tip voor me?
mijn code:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="700" height="250" borderStyle="solid" creationComplete="initApp();">
<mx:Script>
<![CDATA[
private function initApp():void {
srcgrid.dataProvider = [
{Artist:'Carole King', Album:'Tapestry', Price:11.99},
{Artist:'Paul Simon', Album:'Graceland', Price:10.99},
{Artist:'Original Cast', Album:'Camelot', Price:12.99},
{Artist:'The Beatles', Album:'The White Album', Price:11.99}
];
destgrid.dataProvider =[];
}
]]>
</mx:Script>
<mx:HBox>
<mx:VBox>
<mx:Label text="Available Albums"/>
<mx:DataGrid id="srcgrid" allowMultipleSelection="true"
dragEnabled="true" dropEnabled="false" dragMoveEnabled="false">
<mx:columns>
<mx:DataGridColumn dataField="Artist"/>
<mx:DataGridColumn dataField="Album"/>
<mx:DataGridColumn dataField="Price"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
<mx:VBox>
<mx:Label text="Buy These Albums"/>
<mx:DataGrid id="destgrid" allowMultipleSelection="true"
dragEnabled="false" dropEnabled="true" dragMoveEnabled="false">
<mx:columns>
<mx:DataGridColumn dataField="Artist"/>
<mx:DataGridColumn dataField="Album"/>
<mx:DataGridColumn dataField="Price"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:HBox>
</mx:Application>
Ik heb 2 datagrids. Ik kan items van DG1 naar DG2 drag and droppen. Probleem is nu dat ik dus een item die ik al een x eerder heb gedropped vanuit DG1 naar DG2 meerdere keren kan dropen. En dat wi lik eigenlijk niet. Normaal zou je dan de item uit DG1 verwijderen, maar dat wil ik dus niet. Iemand een tip voor me?
mijn code:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="700" height="250" borderStyle="solid" creationComplete="initApp();">
<mx:Script>
<![CDATA[
private function initApp():void {
srcgrid.dataProvider = [
{Artist:'Carole King', Album:'Tapestry', Price:11.99},
{Artist:'Paul Simon', Album:'Graceland', Price:10.99},
{Artist:'Original Cast', Album:'Camelot', Price:12.99},
{Artist:'The Beatles', Album:'The White Album', Price:11.99}
];
destgrid.dataProvider =[];
}
]]>
</mx:Script>
<mx:HBox>
<mx:VBox>
<mx:Label text="Available Albums"/>
<mx:DataGrid id="srcgrid" allowMultipleSelection="true"
dragEnabled="true" dropEnabled="false" dragMoveEnabled="false">
<mx:columns>
<mx:DataGridColumn dataField="Artist"/>
<mx:DataGridColumn dataField="Album"/>
<mx:DataGridColumn dataField="Price"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
<mx:VBox>
<mx:Label text="Buy These Albums"/>
<mx:DataGrid id="destgrid" allowMultipleSelection="true"
dragEnabled="false" dropEnabled="true" dragMoveEnabled="false">
<mx:columns>
<mx:DataGridColumn dataField="Artist"/>
<mx:DataGridColumn dataField="Album"/>
<mx:DataGridColumn dataField="Price"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:HBox>
</mx:Application>