[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

ComboBox ItemRenderer inside Datagrid

Posted on 2013-06-05
2
Medium Priority
?
1,166 Views
Last Modified: 2013-11-13
I have a DataGrid with a ComboBox as an ItemRenderer for one of my columns. When the user selects a row, I want to get the ComboBox's selected value for the selected row on clicking Submit.The datagrid has many columns and user has to select one value for each row.How to find out the selected value of the combo-box??


Here is my code:

<mx:DataGrid id="namesgrid" width="834" height="354" dataProvider="{List}"
                  resizableColumns="true" draggableColumns="true"
                  doubleClick="onGridClick()" doubleClickEnabled="true" x="0" y="0">
                  <mx:columns>
                        <mx:DataGridColumn id="bid" headerText="BName" dataField="branchdesc" width="100"/>
                        <mx:DataGridColumn id="poid" headerText="P-ID" dataField="proddesc" width="100"/>
                        <mx:DataGridColumn id="acid" headerText="No" dataField="accountno" width="80"/>
                        <mx:DataGridColumn id="nac" headerText="Name" dataField="mainpersonname" width="275"/>
                        <mx:DataGridColumn id="art" headerText="Type" dataField="recordtype" width="200"/>      
                <mx:DataGridColumn id="cmbtaskstatus" headerText="Status Change *" width="200"
                       editable="true" editorDataField="value">
                      <mx:itemRenderer>
                            <mx:Component>
                                  <mx:ComboBox color="#000000">
                                        <mx:dataProvider>
                                              <mx:String>FW</mx:String>
                                              <mx:String>AW</mx:String>
                                              <mx:String>CA</mx:String>
                                              <mx:String>OA</mx:String>
                                              <mx:String>RE</mx:String>                                              
                                        </mx:dataProvider>
                                  </mx:ComboBox>
                            </mx:Component>
                      </mx:itemRenderer>
                </mx:DataGridColumn>
   </mx:columns>
</mx:DataGrid>
0
Comment
Question by:CCBRONET
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 1000 total points
ID: 39228241
No doubt this article can i nspire you: http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_6.html (See last example)
0
 
LVL 29

Expert Comment

by:Pravin Asar
ID: 39230943
You have to trap the click or change event for the  itemrenderer (combobox)

change="Alert('You selected ' + data.selected); trace(data.selected);"
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Simple Linear Regression
Progress

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question