Not sure I understand.  The ComboBox usually represents one of a set of
possible values for a datafield in a dataprovider.  Can you give a more
explicit example of the data involved?

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of arashafrooze
Sent: Thursday, November 22, 2007 9:47 AM
To: [email protected]
Subject: [flexcoders] ComboBox inside a DataGrid

 

Hi everyone,
I have a datagrid and I'd like to add a comboBox under one of the
columns. Now apparently I have to specify a dataField for my
DataGridColumn, but I want the data for this column to come from my
combo box. How do i do that?
Im pasting a piece of the code here to make more sense:

<mx:columns>
<mx:DataGridColumn headerText="First Name" dataField="first_name"
editable="false" />

<mx:DataGridColumn headerText="Last Name" dataField="last_name"
editable="false" />

<mx:DataGridColumn headerText="User Name" dataField="login"
editable="false" />

<mx:DataGridColumn headerText="Branch" dataField="branch"
editable="false" />

<mx:DataGridColumn headerText="Role" dataField="role">

<mx:itemEditor>
<mx:Component>
<comp:ExtendedComboBox
dataProvider="{UserList.modelLocator.roles}" dataField="id"
labelField="name" id="RoleSelector" />
</mx:Component>
</mx:itemEditor>

</mx:DataGridColumn>
</mx:columns>

I got the extendedComboBox from ben forta's blog at :
http://www.forta.com/blog/index.cfm/2006/11/22/Flex-ComboBox-With-select
edValue-Support
<http://www.forta.com/blog/index.cfm/2006/11/22/Flex-ComboBox-With-selec
tedValue-Support> 

thank you guys,

-A

 

Reply via email to