This can get little tricky.  You need to have an itemRenderer, that when
triggered by set data() (actually do the work in commitProperties) loops
over the combo box data provider until it matches the current column+line
data item value, then sets the selectedIndex of the combo box.  Thate are
several examples of this available.  I have one here:

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

 

It is more complex than absolutely necessary because I wanted it to be
generic and reusable.  Doing it for a one-off, with a hard coded data field
and dataProvider is much simpler.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of criptopus
Sent: Wednesday, November 25, 2009 5:28 PM
To: [email protected]
Subject: [SPAM] [flexcoders] Combo Box & Data Grid

 

  

If I have a table with a field that contains the numbers 0,1,2,3 and I want
them to be displayed in the data grid say as "Non-Member",
"Member","Instructor","Administrator" and be able to select them with a
combo box only to have the numeric value posted back to the table.

How do you do it?



Reply via email to