thanks, will be trying tomorrov, i understand drag and drop working in datagrid and listcollection's components. and theoretical, can i use construction such as wrote Lee Brimelov in his blog www.gotoandlearn.com. I mean create sprite object and to set it drop property and when i dropped my item, i.e item from datagrid, then create new any object, for example canvas with some elements?
----- Original Message ---- From: Alex Harui <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Tuesday, May 13, 2008 9:45:29 PM Subject: RE: [flexcoders] dragAndDrop in DataGrid and HList? How? The data object that got dropped ends up in the dataProvider, and the Image will pull a value from that dataObject based on labelField or labelFunction of the HList ________________________________ From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of Carlo Gulliani Sent: Tuesday, May 13, 2008 12:57 AM To: Flexcoders Subject: [flexcoders] dragAndDrop in DataGrid and HList? How? good time, everybody, i have two components: DataGrid and HList. I wanna move item from datagrid to hlist, it's ok, all working. <mx:DataGrid width="100%" height="500" id="dg" dragEnabled= "true"> <mx:columns> <mx:DataGridColumn dataField="Name" sortable="false" width="150" itemRenderer= "components. libItem"/> </mx:columns> </mx:DataGrid> <mx:HorizontalList width="100%" height="85%" dropEnabled= "true" dragDrop="dragDropH andler(event) " id="wrk" itemRenderer= "mx.controls. Image"/> and my code: var _IMGDIR:String = "e:\\test\\" ; private function dragDropHandler( e:DragEvent) :void{ if(e.dragInitiator == lib.dg){ var items:Array = e.dragSource. dataForFormat( "items") as Array; var path:String = String(_IMGDIR+ "\\"+items[ 0].Name) trace(path); // all right, i've get e:\test\path_ of_my_picture. jpg // now I wanna to set value to my Image's source property wrk.data.source = path; } } but how to set property source value, which i getting from trace?