Many Thanks,
If only life were so simple!! Cheers. --- In flexcoders@yahoogroups.com, "Dimitrios Gianninas" <[EMAIL PROTECTED]> wrote: > Hi, > > No need to do anything special, just do: > > myDataGrid.dataProvider = remoteObject.result; > > Then the data grid should be declared as follows: > > <mx:DataGrid id="myDataGrid"> > <mx:columns> > <mx:Array> > <mx:DataGridColumn columnName="name" headerText="Name" /> > <mx:DataGridColumn columnName="total" headerText="Total" /> > <mx:DataGridColumn columnName="today" headerText="Today" /> > </mx:Array> > </mx:columns> > </mx:DataGrid> > > No need to iterate. > > Jimmy Gianninas > Software Developer - Optimal Payments Inc. > > > _____ > > From: digital_eyezed [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 31, 2005 9:19 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Value Object Help > > > > Hi, > > I need a little help: > > I have a remoteobject which returns an array of Value Objects. The > value object contains two ints (numbers) and a string. I want to > display this on a datagrid. How do I convert this array into > something that I can use? > > I have created an actionscript class (testVO.as) which mirrors the > java Class testVO so I think I'm going in the right direction, now > all I need to do is iterate through the array (remoteObject.result, > which is where I am stuck (my actionscript is obviously a bit rusty). > > Cheers > > Java: > > public class TestVO { > public String name; > public int total; > public int today; > > public void setName(String name){ > this.name = name; > } > public void setToday(int today){ > this.today = today; > } > public void setTotal(int total){ > this.total = total; > } > public String getName(){ > return this.name; > } > public float getTotal(){ > return this.total; > } > public float getToday(){ > return this.today; > } > } > > ActionScript: > > public class TestVO { > var name:String; > var total:Number; > var today:Number; > > public void setName(name:String){ > this.name = name; > } > public void setToday(today:Number){ > this.today = today; > } > public void setTotal(total:Number){ > this.total = total; > } > public String getName(){ > return this.name; > } > public float getTotal(){ > return this.total; > } > public float getToday(){ > return this.today; > } > } > > > > > > Yahoo! Groups Sponsor > ADVERTISEMENT > click here > <http://us.ard.yahoo.com/SIG=129paac65/M=298184.6018725.7038619.30011 76/ > D=groups/S=1705007207:HM/EXP=1112365160/A=2593423/R=0/SIG=11el9gslf/* htt > p://www.netflix.com/Default?mqso=60190075> > > <http://us.adserver.yahoo.com/l? M=298184.6018725.7038619.3001176/D=group > s/S=:HM/A=2593423/rand=612538112> > > _____ > > Yahoo! Groups Links > > > * To visit your group on the web, go to: > http://groups.yahoo.com/group/flexcoders/ > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] subject=Unsubscribe> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > > > <table width=800 cellpadding=4 cellspacing=10 border=0><tr bgcolor=BDBDBD><td valign=top width=400><font face=verdana size=2 color=FFFFFF><b>AVIS IMPORTANT</b></font></td><td valign=top width=400><font face=verdana size=2 color=FFFFFF><b>WARNING</b></font></td></tr><tr><td valign=top width=400><p align=justify><font face=verdana size=1 color=808080> Les informations contenues dans le present document et ses pieces jointes sont strictement confidentielles et reservees a l'usage de la (des) personne(s) a qui il est adresse. Si vous n'etes pas le destinataire, soyez avise que toute divulgation, distribution, copie, ou autre utilisation de ces informations est strictement prohibee. Si vous avez recu ce document par erreur, veuillez s'il vous plait communiquer immediatement avec l'expediteur et detruire ce document sans en faire de copie sous quelque forme.</td><td valign=top width=400><p align=justify><font face=verdana size=1 color=808080> The information contained in this document and attachments is confidential and intended only for the person(s) named above. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution, or any other use of the information is strictly prohibited. If you have received this document by mistake, please notify the sender immediately and destroy this document and attachments without making any copy of any kind.</td></tr></table> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/