You do not.  Item renderers are recycled, and only the visible ones even
exist.  Renerers cannot be relied on to retain any stae

 

Your itemRenderer must set it state (selectedIndex of the ComboBox)
based on the value of a property on the dataProvider item.  When a user
makes a selection in the Combo box, it must update that property.

 

You can then loop over the dataProvider to access the current values.

 

Making this happen is a bit complex.  Take a look at the example here:

http://www.cflex.net/showFileDetails.cfm?ObjectID=767

 

I do not provide it as a production-level component, just as an example
or starting point, but it does address the necessary issues.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of ericbichara
Sent: Thursday, June 12, 2008 11:36 AM
To: [email protected]
Subject: [flexcoders] Looping through datagrid rows

 

Hi All,

I have a datagrid being populated by an arraycollection. The data grid
has 3 columns, 2 populated by values in the arraycollection and one
with a combobox as an itemrenderer which is not in the dataprovider.
How do look through the entire grid getting the combobox value which
the user has chosen for each row? thanks in advance.

/Eric

 

Reply via email to