Hi all,

 

Wonder if anyone can help on this –

 

I have a tile list with a Cutsom  itemRenderer – initially this displays fine (I am dragging and dropping data over it from a data grid), but I then want to update the data in one field (email). The back end fetched he appropriate data ondragdrop and then calls a function which updates the arrayColection which is  the dataprovider. What then happened is that the email text field in the itemrendere should update – which it does BUT only for the second, third etc tiles and not for the first – its driving me nuts and any help would be gratefully received !!

 

Below : the tile l Tile LIST FUNCTIONS

private function completedrop(event:DragEvent):void{

                                               

                                                dTarget = TileList(event.currentTarget)

                                                var items:Array = event.dragSource.dataForFormat("items") as Array;

                                                currentDropIndex= dTarget.calculateDropIndex(event)

                                               

                                                            for (var i:uint = 0; i < items.length; i++) {

                                                                        var filename:String = createFileName(items[i].URL)

 

 

                                                                        // ceates a Remote Object

                                                                        this.parentApplication.searchData.web_data_call(filename);

                                                                        // this is not called at this point but data is saved

                                                                        loadedData[currentDropIndex] = items[i];

           

                                                            }          

                                                           

                        }                      

 

 

 

                                    //triggered when the RemoteObject result handler is called

                        public function renderItem(dataw:Object):void {

                                    // add in the new data if it exists

                                    if (dataw.am==1) {

                                                            loadedData[currentDropIndex].ACP_NATIONAL = dataw.ACP_National;

                                                            loadedData[currentDropIndex].EMAIL = dataw.email1;      

                                                            loadedData[currentDropIndex].MOBILE = dataw.mobile;

                                    }                                  

                                    IList(dTarget.dataProvider).setItemAt(loadedData[currentDropIndex],currentDropIndex);

                                   

 

                        }                      

 

 

 

 

 

And the  intem rendered

 

 

 

……

 

<mx:Text text="{createName(data.URL)}"/>

<mx:TextArea text = "{data.SUMMARY}" />

<mx:Text text="{data.SCORE}"/>

<mx:Text text="{data.SIZE}"/>

            <mx:HRule width="267" height="20"/>

<mx:Text text="{data.EMAIL}"  id="email" />

<mx:Text text="{data.MOBILE}"/>

</mx:VBox>

 

 

Thanks in advanced

 

Matt

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to