views:

84

answers:

1

Hi,

I have a datagrid with an XML object as dataprovider. There are 2 columns in the datagrid which have comboboxes as their itemrenderers. The rendereriseditor property is also marked true. These itemrenderers are defined in their own mxml files. What i want is if the user selects a particular item in the combobox, say NA, then the value of the other combobox should also become NA.

How can i achieve such a behavior?

Thanks

Sid

+2  A: 

The possible solution may be to change the data's prop that can be bound in that dependable column. There is no default communication mechanism for item renderers in Flex but you can play with dataProvider.

Also, I wouln not recommend this way http://stackoverflow.com/questions/528796/flex-sending-a-parameter-to-a-custom-itemrenderer as it is not OOP style.

Also, this article may be useful too: http://blog.flexdevelopers.com/2009/06/flex-examples-item-renderers-in.html

mico
+1 for linking to an article that mentions itemRenderers are recycled.
adamcodes
Thank Mico. The information in the links is useful.
TheCoolestSid