[flexcoders] associative arrays and dataproviders

2006-07-14 Thread simon_janssens
Hi,

I was wondering how you access an array inside a dataprovider?

I have a datagrid with a dataprovider of clients, inside that is an
array of address details. Can anyone tell me how I can bind the items in
the address array to columns of the datagrid?

clients
 -id
 -name
 -address
  -- address1
  -- address2
 -email



mx:DataGrid id=clientDisplay dataProvider={clients} left=10
top=10 right=10 height=193
 mx:columns
 mx:DataGridColumn headerText=ID dataField=id
editable=false/
 mx:DataGridColumn headerText=name dataField=name/

 !-- how do I bind address.address1 and
address.address2? --
 mx:DataGridColumn headerText=Address1
dataField=address.address1/
 mx:DataGridColumn headerText=Address2
dataField=address[address2]/
 mx:DataGridColumn headerText=email
dataField=email/
 /mx:columns
 /mx:DataGrid







 Yahoo! Groups Sponsor ~-- 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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/
 




RE: [flexcoders] associative arrays and dataproviders

2006-07-14 Thread Tracy Spratt












Use a labelFunction.



Specify it on the DataGrid tag or on a
columntag.



The specified function will receive a
reference to the current Item object (and the column index, so one function can
work for all columns).



Dot down to get the data out of the nested
object, and return a string.



Tracy











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of simon_janssens
Sent: Friday, July 14, 2006 2:11
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] associative
arrays and dataproviders











Hi,

I was wondering how you access an array inside a dataprovider?

I have a datagrid with a dataprovider of clients, inside that is an
array of address details. Can anyone tell me how I can bind the items in
the address array to columns of the datagrid?

clients
-id
-name
-address
-- address1
-- address2
-email

mx:DataGrid id=clientDisplay dataProvider={clients}
left=10
top=10 right=10 height=193
mx:columns
mx:DataGridColumn headerText=ID dataField=id
editable=false/
mx:DataGridColumn headerText=name dataField=name/

!-- how do I bind address.address1 and
address.address2? --
mx:DataGridColumn headerText=Address1
dataField=address.address1/
mx:DataGridColumn headerText=Address2
dataField=address[address2]/
mx:DataGridColumn headerText=email
dataField=email/
/mx:columns
/mx:DataGrid






__._,_.___





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








   



  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___