ok
so you know how when u have an html select box, each option has a
value and display? like <option value='1'>One</option>

ok so I want the same thing. I want the combobox to display something
but onchange submit a value. so for example the combobox would display
"One" but when submitted it submits "1".
Now this "1" is tied to an attribute of a User Object.
each row of my datagrid represents a user object and each user object
has a "role_id" attribute. 
My combobox's dataprovider is a static list of all possible roles and
i want the option with the user's "role_id" to be selected. but it
cannot display the role_id, but must display the role_label.
How do i do this?

it probably doesnt make much sense. grrr i hate having to type this out.


--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> 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