I have specified column as editable.
No settings for renderIsEditor and itemEditor.
Alex Harui <[EMAIL PROTECTED]> wrote:
Im about done for the day. You havent really given me what I
need to help you. Basically, it looks like the itemRenderer is a ComboBox, but
I dont know if youve 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 DGs data is XML and the CBs
dataprovider isnt, it probably cant match and youll 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:
Im 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
CBs 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
markgoldin_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