Dan,

I don’t recall all the posts to this page but here is my bit.

 

In the main dataProvider, include the default options for the combo box in an array property on each item object.  In the cell renderer, where you have access to each item object, grab the combo box array and assign it to the dataProvider of the ComboBox.  I believe there is a full example of this on cflex.net.  Hmm, not exactly what I remembered but here is a possible link:

http://www.cflex.net/showfiledetails.cfm?ObjectID=255

 

If, at run-time, you need to modify the options of a combobox in a particular cell, use the dataProvider API to update the combobox array in the item object in the dataProvider.  This should automatically cause the cellRenderer to update the cell with the new combobox options.

 

If I have lost track of this thread completely, ignore this post.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Dan Plesse
Sent: Friday, October 21, 2005 11:22 AM
To: [email protected]
Subject: RE: [flexcoders] ComboBoxCellRenderer question

 

I don’t think I can do event handler functions for other components inside ComboBoxCellRender itself.

 

Can I have a show of hands of people who made their Dataproviders dynamic for comboboxes inside a cellrender?

 

Can’t I just setDataprovider?

 

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Matt Chotin
Sent: Thursday, October 20, 2005 10:47 PM
To: [email protected]
Subject: RE: [flexcoders] ComboBoxCellRenderer question

 

You should adjust the data of the item itself and then have the cell renderer read out of that item (or maybe you’ll need some form of indirection if you don’t want to edit the item).  Basically you need to do this work in the ComboBoxCellRenderer itself, you cannot do it from the outside and point in.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Dan Plesse
Sent: Tuesday, October 18, 2005 11:26 AM
To: [email protected]
Subject: [flexcoders] ComboBoxCellRenderer question

 

I want to change the data in the cell’s comboBox to other database
datatypes. 

So I tried this

var dp = new mx.central.data.DataProviderClass();
    dp.addItem({dataType:"tinyInt", dataType:"Double"});
    ComboBoxCellRenderer.setDataProvider(dp);

Error message:
There is no method with the name 'setDataProvider'

And this

var dp = new mx.central.data.DataProviderClass();
         dp.addItem({dataType:"tinyInt", dataType:"Double"});
         ComboBoxCellRenderer.dataProvider = dp;

No error

And This:

var dp = new mx.central.data.DataProviderClass();
         dp.addItem({dataType:"tinyInt", dataType:"Double"});
         ComboBoxCellRenderer.dataProvider.setDataProvider(dp);

No error:

Also where do I get the this control?
import com.iterationtwo.cairngorm.control.*;










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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to