Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Flex How to add a DropDown List in Flex DataGrid
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


rekha
How to add a DropDown List in Flex DataGrid
0 Answer(s)      a year and 7 months ago
Posted in : Flex


hi

I am trying to add a DropDownList in a DataGrid table. After the user selects one of the items from the drop down list, the Item that I have selected is not reflected or did not get selected. I know I can use ComboBoxGridItemEditor to achieve the result I am asking for. But combo box is editable, I do not want the user to edit but just select from one of the choices in the list. That's my reason for trying to add a dropDownList in dataGrid.

Pls can u tell me how the selected item in my dropdownlist can be recognize and update the value of the cell in the dataGrid and save the value back to the data provider??

Problem : so when I try to select blue, the cell do not get updated, instead it remains red.

thanks Rekha.

  <fx:Script>
    <![CDATA[                
        import mx.collections.ArrayCollection;      
        [Bindable]
        private var myDP:ArrayCollection = new ArrayCollection([
            {label1:"Order #2314", quant:3, color:'red'},
            {label1:"Order #2315", quant:3, color:'red'}     
        ]); 


    ]]>
</fx:Script>

<s:DataGrid id="myDG" x="85" y="57" width="393" height="151" dataProvider="{myDP}"
            editable="true" variableRowHeight="true">
    <s:columns>
        <s:ArrayList>
            <s:GridColumn dataField="label1" headerText="Order #" editable="false"/>                
            <s:GridColumn dataField="quant" headerText="Qty" editable="true"/>

            <s:GridColumn dataField="color" headerText="Color" editable="true">                     
                <s:itemEditor>
                    <fx:Component>                              
                        <s:GridItemEditor>                          
                            <s:DropDownList id="myDropList" requireSelection="true">
                                <s:dataProvider>
                                    <s:ArrayCollection>
                                        <fx:String>red</fx:String>
                                        <fx:String>blue</fx:String>
                                        <fx:String>green</fx:String>
                                    </s:ArrayCollection>                                        
                                </s:dataProvider>
                            </s:DropDownList>                               
                        </s:GridItemEditor>                         
                    </fx:Component>
                </s:itemEditor>                 
            </s:GridColumn> 

        </s:ArrayList> 
    </s:columns >
</s:DataGrid>

Advertisement
View Answers

Related Tutorials/Questions & Answers:
How to add a DropDown List in Flex DataGrid
How to add a DropDown List in Flex DataGrid  hi I am trying to add... select from one of the choices in the list. That's my reason for trying to add a dropDownList in dataGrid. Pls can u tell me how the selected item in my
How to add a DropDown List in Flex DataGrid
How to add a DropDown List in Flex DataGrid  hi I am trying to add... select from one of the choices in the list. That's my reason for trying to add a dropDownList in dataGrid. Pls can u tell me how the selected item in my
Advertisements
How to add dropdown list in a row of a sort table applet?
How to add dropdown list in a row of a sort table applet?  How to add dropdown list in a row of a sort table applet
how to add data dynamically from database into a dropdown list in a jsp
how to add data dynamically from database into a dropdown list in a jsp ... list.In that first list is for department and the 2nd list for the names of the persons who work in that department.The values into the drop down list should
DataGrid in flex
DataGrid in flex  Hi.... What kind of data grids you can create through Flex applications? please tell me about the datagrid so i can implement it in my application .... Thanks
DataGrid in flex
DataGrid in flex  Hi....... I want to know about How do you access methods in DataGrid from external itemRenderers? please give an example so i can clearly understand.... Thanks
how to set value of dropdown list
how to set value of dropdown list  Hello Sir, I'd solved the earlier problems somehow but now this time another problem arised when I want to pass the value from a link to a dropdown list. I want to set the dropdown list selected
how to set value of dropdown list
how to set value of dropdown list  Hello Sir, I'd solved the earlier problems somehow but now this time another problem arised when I want to pass the value from a link to a dropdown list. I want to set the dropdown list selected
DataGrid in flex
DataGrid in flex  Hi.... please provide the solution of that problem When I have only a single record, why doesn't it appear in my DataGrid? please give an example Thanks  Ans: This is a caused in flex
DataGrid in flex
DataGrid in flex  Hi........ Please provide the solution of that problem When I add or modify an item in my dataProvider, why doesn't it show up in my DataGrid? Thanks in advance  Ans: When you work
DataGrid in flex
DataGrid in flex  Hi..... Please tell me about DataGrid extends which class? please give me the syntax......... Thanks
DataGrid in flex
DataGrid in flex  Hi.... Please tell me What is the data type of the dataprovider property in DataGrid? please give an small example for that.... Thanks
DataGrid in Flex
Adobe Flex DataGrid: In Flex, DataGrid is a kind of list which can display... column. Adobe Flex DataGrid provides many features like columns can be resized...;mx:ArrayCollection> and <mx:Object> tags. Adobe Flex Datagrid
how to load value in dropdown list after selecting value from first dropdown list using javascript
how to load value in dropdown list after selecting value from first dropdown list using javascript  how to load value in dropdown list after selecting value from first dropdown list using javascript
DropDown list
DropDown list  how to get mysql database values into dropdown usign java servlet and ajax?   Here is a jsp code that displays the database values into dropdown list. 1)country.jsp: <%@page import="java.sql.*"%>
Flex DataGrid control
DataGrid in Flex:- A DataGrid is a control in flex which is display data... and display via custom renderers. The main features of the DataGrid is that, you can... and user can drag and drop capability. In this Tutorial you can see how to create
how to use dropdown list in JSP and display value in same page
how to use dropdown list in JSP and display value in same page  I have a Dropdown list with some values say "A", "B" and "C" When the user selects... in the same page Value selected = C How can we do this in a JSP page
how to perform the client side validations to the dropdown list using javascript?
how to perform the client side validations to the dropdown list using javascript?  Hi Good Morning! This is Prasad, I want to perform the client side validation to the dropdown list using javascript. So give me sample.I am
dropdown list in jsf
dropdown list in jsf  I want to add a list box to display the country name from the lists on all countries.When I select for e.g India then in the second list box it will display the states related to India only and the flow
dropdown list in jsp
dropdown list in jsp  hai, i have static dropdown list.. i want to get the selected value in string variable without jsp regards asha
struts dropdown list
struts dropdown list   In strtus how to set the dropdown list values from database ? I have a ArrayList object and set this object in dropdown jsp... = MasterDataDAO.getValues(list); request.setAttribute("masterlist", masterList
How to display content in same page while selecting fron dropdown list
How to display content in same page while selecting fron dropdown list  Thanks for your suggesstion.but Please provide me coding by using only one dropdownlist in javascript or jquery.Thanks in advance
How to display content in same page while selecting fron dropdown list
How to display content in same page while selecting fron dropdown list  Hai frnds, I am beginner of java.i have doubt in codings.I am using dropdownlist in jsp page.If i select any value in that list(for eg-rollno
How to access Contacts from gmail using LDAP in JSP dropdown list
How to access Contacts from gmail using LDAP in JSP dropdown list  HI, I am creating a JSP page in which i have to make a dropdown box, and access gmail contacts in that drop downlist using LDAP. Can any one plz help me out
How to automatically change the value of the textbox based on the dropdown list?
How to automatically change the value of the textbox based on the dropdown list?  I want to know how to automatically change the value of price...="Add Item to Purchase"><input type="reset" value="Clear" /></td>
How would you read in and add all this into a list?
How would you read in and add all this into a list?   FYI this is all stacked. 0 " " " " " " " " " " 1 "48" "111" "Dallam" "06" "County" 2 "48" "421" "Sherman" "06" "County" 3 "48" "295" "Lipscomb" "06
how can i send a mail to a particular user from a many user dropdown list in jsp
how can i send a mail to a particular user from a many user dropdown list in jsp  how can i a sent a user question to a particular person from a drop down list in jsp
Retrieval of Dropdown list
Retrieval of Dropdown list  Hi frnds... Am having problem... ... for eg, let A1,A2,A3,A4 be the values in dropdown.. if i click A1, the corresponding value of A1, list of name corresponding to A1 wil be displayed in another
dropdown list and text fields in php
dropdown list and text fields in php  How could I use php to populate text fields by selecting a name of a business from dropdown list? Those text fields that will be populated by information in regards its company name, suite
getting values from dropdown list
getting values from dropdown list  I am having a dropdown list which has hardcoded values ( we need it hardcoded only and will not be populated from... to the action. My action is getting called however, i am not sure how to pass
Dropdown Checkbox list
Dropdown Checkbox list This tutorial explains how to create jquery Dropdown... jquery Dropdown Checkbox list. The application directory structure should look like... dropdown , then displays dropdown list as checkbox  You can
Advertisements
 

 

 

DMCA.com