Is the entire DG editable=true as well? Otherwise, I would think you would be getting a TextInput popping up when you clicked on a cell. Normally, you would set both DataGrid.editable=true, the columns.editable=true (which is their default), and if you want a stack of ComboBoxes, you would set itemRenderer=ComboBox and rendererIsEditor=true. Visually, I prefer not having a stack of CB's and would leave itemRenderer to the default value and set itemEditor=ComboBox.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Saturday, December 22, 2007 6:11 PM To: [email protected] Subject: RE: [flexcoders] Editable DataGird, Editable ComboBox as itemRenderer I have specified column as editable. No settings for renderIsEditor and itemEditor. Alex Harui <[EMAIL PROTECTED]> wrote: I'm about done for the day. You haven't really given me what I need to help you. Basically, it looks like the itemRenderer is a ComboBox, but I don't know if you've specified if that column is editable, has rendererIsEditor=true, has an itemEditor specified, etc. Essentially, a ComboBox will try to find the data item in its dataprovider when used as a renderer. Thus, because the DG's data is XML and the CB's dataprovider isn't, it probably can't match and you'll need some custom code to search the arraycollection for the right item and set selectedIndex appropriately. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Saturday, December 22, 2007 4:58 PM To: [email protected] Subject: RE: [flexcoders] Editable DataGird, Editable ComboBox as itemRenderer AutoComplete is subclassed Combobox. DataGrid is set in the code: public function setDataSource(XMLData:Object, o:Object):void { o.dataProvider = XMLData; } Alex Harui <[EMAIL PROTECTED]> wrote: I'm lost. What is AutoComplete? How is the DataGrid set up? ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Saturday, December 22, 2007 4:41 PM To: [email protected] Subject: RE: [flexcoders] Editable! DataGird, Editable ComboBox as itemRenderer Something like this: var ConsistPersonnel1Person:ClassFactory = new ClassFactory(AutoComplete); var personArray:ArrayCollection = new ArrayCollection([ {data:1, label: "Conductor"}, {data:2, label:"Engineer"}, {data:3, label:"Helper"}]); var consistPersonnel1Person:Object = accidentsModule.ConsistPersonnel1.columns[0]; ConsistPersonnel1Person.properties = {dataProvider : personArray, editable : consistPersonnel1Person.editable}; consistPersonnel1Person.itemRenderer = ConsistPersonnel1Person; Alex Harui <[EMAIL PROTECTED]> wrote: How do you have it set up? rendererIsEditor or itemEditor=ComboBox?&nb! sp; Are the values for the column valid items in the CB's dataprovider? Which version of Flex are you using? ! ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Saturday, December 22, 2007 3:42 PMTo: [email protected] Subject: RE: [flexcoders] Editable DataGird, Editable ComboBox as itemRenderer Yes, it does work. But, when it is an editable control and DG is editable too then I have a problem. As soon as I drop it down (nothing else) its value gets replaced with an underlying value from the DG's datasource. Alex Harui <[EMAIL PROTECTED]> wrote: Combobox has been successfully used in an editable DG. What problem are you having? ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mark! goldin_2000 Sent: Saturday, December 22, 2007! 3:01 PM To: [email protected] Subject: [flexcoders] Editable DataGird, Editable ComboBox as itemRenderer It looks like DG.editable = true messing up combobox. I can easily have it false, but what if DG has more columns and they are plain text fields? Custom renderers for these too? Thanks

