Dynamic comboBox in a dataGrid?

i have a dataGrid that starts out blank. When a button is
clicked, it populates based on the contents of a few components.
The 3rd column needs a comboBox. I need the following
behaviors:
1-when the button is clicked, this populates with the text
values in a certain text field.
2-under certain circumstances, i need to be able to add and
subtract from this comboBox.
i have read this:
http://blog.flexmonkeypatches.com/2008/02/18/simple-datagrid-combobox-as-item-editor-examp le/
but it looks like the comboBox in that example has fixed
values. How can i dynamically alter the values in
these comboBoxes? i have the comboBoxes in the dataGrid
component, but i can't figure out how to access their
dataProviders!
thanks!

You can have your comboBox itemRenderer populate based on an
ArrayCollection in your dataDrid dataProvider. Then, by changing
the dataProvider's ArrayCollection field, you could change each of
the comboBoxes accordingly. If you need different comboBox values
for different comboBoxes, then you will need something a bit
different. It would help to see your code.
Vygo

Similar Messages

  • ComboBox inside a datagrid

    Hi all,
    How can I put a comboBox inside a datagrid?
    I want to set the comboBox with their own dataprovider and
    the id should
    pass to the datagrid fill at the save time.
    I try this but doesnt let me to include a dataprovider.
    Any links??
    please help and thank you in advance.
    JFB
    <mx:DataGridColumn headerText="Rate" dataField="rate"
    editable="false">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="rate_cb"></mx:ComboBox>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>

    Hi,
    I think you need to declared your array public at the
    begining of the page
    like
    [Bindable]
    public var dataArray = new ArrayCollection();
    You need to use outerDocument.
    <mx:ComboBox activate="true" labelField="TEXT"
    dataProvider="{outerDocument.dataArray}" />
    I discover that the components are case sensitive also.
    I hope this help.
    JFB
    "MLK_SS" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi All,
    >
    > I am having a problem displaying data into a combo box
    inside a data grid.
    >
    > I am getting data from a webservice and storing the data
    into a Array
    > Collection variable and trying to pass the var as the
    data provider for
    > the
    > combo box.
    >
    > If I try an individual combo box it works fine.
    >
    > But, when trying to integrate into a datagrid it gives
    an error saying
    > Access
    > of undefined property. I tried using outerDocument as
    mentioned above, the
    > error doesnot show up but the output does not show up
    with the data inside
    > the
    > Data grid Combo box.
    >
    > <mx:DataGrid id="fav" x="10" y="332"
    headerColors="[#C3D3AA, #C3D3AA]"
    > enabled="true" editable="true"
    textDecoration="underline">
    > <mx:columns>
    > <mx:DataGridColumn width="120" headerWordWrap="true"
    > headerText="Fav./Del./ Copy/Edit" fontWeight="bold"
    editable="false"
    > dataTipField="Favourites" activate="true" >
    > <mx:itemRenderer>
    > <mx:Component>
    > <mx:VBox>
    > <mx:ComboBox activate="true" labelField="TEXT"
    > dataProvider="{dataArray}" />
    >
    > </mx:VBox>
    >
    > </mx:Component>
    > </mx:itemRenderer>
    > </mx:DataGridColumn>
    > </mx:columns>
    > </mx:DataGrid>
    >
    > the function that handles the data result is :
    >
    > public function handleResult(event:ResultEvent):void{
    >
    > dataArray = new ArrayCollection();
    >
    > tasktypeArray = new ArrayCollection();
    > var myXML:XML = new XML(event.result);
    > var kf:XMLList = myXML.child("WORKLIST");
    >
    > var tasktype:XMLList = myXML.child("TASKTYPE");
    > a = kf.item;
    > b= kf.item[0].TEXT;
    >
    > textarea1.text = myXML.toXMLString();
    > textarea3.text = myXML.child("TEMPLATE");
    > trace(kf.child("TEXT").length());
    > for (var x:int = 0; x < 25; x++) {
    > var resultObj:Object = new Object ();
    >
    > resultObj.TEXT
    > =tasktype.descendants("item")[x].TEXT.valueOf();
    > dataArray.addItem(resultObj);
    >
    > }
    >
    > Please let me know where I am going wrong
    >
    > Thanks,
    >
    >

  • ComboBox embedded in DataGrid

    Hi,
    I want to embedded a ComboBox in a Datagrid.
    The data displays in the Combox with the code in the
    ComboBoxCellRenderer.as:
    public function set data(value:Object):void {
    _data = value;
    var dp:DataProvider = new DataProvider(value.plaats);
    dataProvider = dp;
    public function get data():Object {
    _data.plaats = arr;
    return _data;
    -How can I transmit the ComboBox.selectedItem to the Datagrid
    -and how can I read the CellRenderer.data in the DataGrid,
    var cr: ComboBoxCellRenderer =
    Datagrid.itemToCellRenderer(e.item) as ComboBoxCellRenderer
    =>returns null
    trace(cr.data);
    Thanks for helping me

    Hi,
    I'm sorry to bug you with a non-technical discussion, but I
    am a recruiter in San Diego. My client is in need of 3 Senior Flex
    Developers for their project. I have had an extremely rough time
    finding someone for this position. Would you be interested in this
    position, or do you know of anyone that might be? We do pay
    referral fees. This position may be open to telecommuting.
    Job Description:
    They are in the midst of a major re-architecting of their
    Corporate Management system utilizing many cutting edge
    technologies. As it relates to the position they are using Flex as
    their UI.
    This is either a contract, or a full-time position.
    Pay: Market Rate
    Thanks for your help!
    Natalie Fay
    Outsource Technical
    www.ostechnical.com
    [email protected]
    858.874.5637

  • Dynamic ComboBox

    Hi,
    I'd like to create a dynamic combobox that will add entries according to user input from a dialog box.
    Can anyone advise on how to achieve this?
    Thanks in advance
    Bulleo

    Hello,
    import java.awt.event.*;
    import javax.swing.*;
    public class ComboDialog extends JFrame
         JComboBox combo = null;
         ComboDialog()
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel content = new JPanel();
              combo = new JComboBox(new String[] { "Please enter a new Entry" });
              JButton newEntry = new JButton("new Entry");
              newEntry.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        combo.addItem(
                             JOptionPane.showInputDialog("Please enter a new Entry:"));
              content.add(newEntry);
              content.add(combo);
              setContentPane(content);
              setSize(200, 200);
              setLocationRelativeTo(null);
              setVisible(true);
         public static void main(String[] args)
              new ComboDialog();
    }Hope it helps,
    Regards
    Tim

  • DataGrid with dynamic comboboxes

    I need to design a dataGrid with comboboxes in one column. These comboboxes should all have different dataProviders based on a value from column 1. What would a general approach be?
    Thanks

    The renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • WPF Finding Selected ComboBox Item Within DataGrid

    Hi all... I'm having an issue trying to access the selected item value in a ComboBox within a DataGridTemplateColumn. 
    Through another question/answer I have got the ComboBox displaying the names as it should but the next step I'm having issues with is to be able to loop through each row in the DataGrid and determine the selected value of the ComboBox in that row as
    well as some other items and run some other code based on those values. 
    Any help would be appreciated. 
    Thanks,
    Greg
    <Grid>
    <DataGrid x:Name="gvDefaultCWWSchedule" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,109,10,214" AutoGenerateColumns="False" Grid.Row="0"
    AllowDrop="True" IsReadOnly="False" SelectionMode="Single" Background="Beige" CanUserAddRows="False">
    <DataGrid.Columns>
    <DataGridTemplateColumn Width="150">
    <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <ComboBox Name="ddlUsers"
    ItemsSource="{Binding Path=Users}"
    DisplayMemberPath="{Binding Name, Mode=TwoWay}"
    SelectedValuePath="{Binding Uid, Mode=TwoWay}"
    SelectedIndex="{Binding Uid, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
    SelectionChanged="ComboBox_SelectionChanged"
    >
    <ComboBox.ItemTemplate>
    <DataTemplate>
    <StackPanel Orientation="Horizontal">
    <TextBlock Text="{Binding Name}" />
    </StackPanel>
    </DataTemplate>
    </ComboBox.ItemTemplate>
    </ComboBox>
    </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    </DataGridTemplateColumn>
    <DataGridTextColumn Binding="{Binding WeekNumber}" />
    </DataGrid.Columns>
    </DataGrid>
    <Button Content="Button" HorizontalAlignment="Left" Margin="729,32,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
    </Grid>
    public partial class Test : Window
    public Test()
    InitializeComponent();
    BindDefaultCWWSchedule();
    private void BindDefaultCWWSchedule()
    // THIS IS COMING FROM MY DB
    List<CurrentUser> UsersFinal = new List<CurrentUser>();
    UsersFinal.Add(new CurrentUser { Uid = 1, Name = "JOHN" });
    UsersFinal.Add(new CurrentUser { Uid = 2, Name = "BILL" });
    UsersFinal.Add(new CurrentUser { Uid = 3, Name = "MARY" });
    ObservableCollection<CWWDefaultScheduleWeek> DefaultSchedules = new ObservableCollection<CWWDefaultScheduleWeek>();
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 1, SelectedUser = null });
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 2, SelectedUser = null });
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 3, SelectedUser = null });
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 4, SelectedUser = null });
    gvDefaultCWWSchedule.ItemsSource = DefaultSchedules;
    private void Button_Click(object sender, RoutedEventArgs e)
    var rows = gvDefaultCWWSchedule.ItemsSource;
    ObservableCollection<CWWDefaultScheduleWeek> CWWSchedAssignments = new ObservableCollection<CWWDefaultScheduleWeek>();
    foreach (var row in rows)
    CWWDefaultScheduleWeek r = (CWWDefaultScheduleWeek)row;
    // FOR EACH ROW HERE I'M WANTING TO CREATE A LIST OF ITEMS AND RUN FURTHER CODE BASED ON IT... ISSUE IS FINDING THE ACTUAL SELECTED USER ON EACH ROW...
    CWWSchedAssignments.Add(new CWWDefaultScheduleWeek
    Users = r.Users,
    SelectedUser = r.SelectedUser,
    WeekNumber = r.WeekNumber
    private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    gvDefaultCWWSchedule.CommitEdit();
    public class CWWDefaultScheduleWeek
    public IEnumerable<CurrentUser> Users { get; set; }
    public CurrentUser SelectedUser { get; set; }
    public int WeekNumber { get; set; }
    public class CurrentUser
    public int Uid { get; set; }
    public string Name { get; set; }

    In a way, wpf is similar to web.
    More so than windows forms anyhow.
    XAML is mark up and flows like html.
    You have padding and margin which are rather familiar concepts.
    Whereas windows forms is absolute positioning and... well totally different from markup.
    You might find this sample interesting as a sort of mvvm taster.
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    and event handling equivalents
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    Note
    With a combo you bind the selecteditem to a propfull and then you can put a method call in the setter.  That will then be invoked when the user changes selection.
    Good luck and welcome to wpf development.
    It's a great technology.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Two comboBox in a datagrid

    Hi All,
    When I create a new line in my grid I want to include two
    comboBox, the
    second comboBox related to the first one.
    I got it work partial, I can create the second combo on the
    fly but how can
    I insert the combo into the grid for specific row and column.
    The column is the same but the row change if I add one.
    Thanks
    JFB

    Yes? but how in a dynamic form?
    This is what I'm doing... my setCategory function fill the
    array for the
    second comboBox but this only work for one row in my datagrid
    because if I
    set the second row in my datagrid and I change the option in
    my first
    comboBox it change the values for all second comboBox values.
    Now I can create a new comboBox on the fly but if I say
    comboBox.id =
    "materialItem_cb" it doesn show in the datagrid.
    How can I do this? Please help... I'm trying different things
    without luck
    Tks
    JFB
    public function setCategory(tempCombo:ComboBox):void{
    acMaterialsItem.removeAll();
    for each (var item:Object in acAllItems) {
    if (item.itemCategoryID == tempCombo.selectedItem.id) {
    acMaterialsItem.addItem(item);
    <mx:DataGridColumn headerText="Category"
    dataField="itemCategoryID"
    editable="false" width="150">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="category_cb"
    dataProvider="{outerDocument.acItemCategory}"
    labelField="label"
    change="outerDocument.setCategory(category_cb)"
    width="150"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn headerText="Material Description"
    dataField="materialItemID" editable="false" width="200">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="materialItem_cb"
    dataProvider="{outerDocument.acMaterialsItem}"
    labelField="label"
    width="200"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    "ntsiii" <[email protected]> wrote in message
    news:f98ags$h40$[email protected]..
    > This must be handled by your item renderer.
    >
    > Tracy

  • Error while saving dynamic row values of datagrid with record.

    hi friends,
    i am trying to add dynamic row in datagrid and save that value with record.i succeeded in first part while i am saving the record the error show like this.
    errro:Property fromAmount not found on com.ci.view.Task and there is no default value.
    how i resolve this error.
    any suggession welcom
    thanks in advance.
    B.venkatesan
    code:
    package:
    package com.ci.view
        [Bindable]
        public class Task
            public function Task(frmAmount:String,toAmount:String,commissionPercentage:String)
                this.frmAmount=frmAmount;
                this.toAmount=toAmount;
                this.commissionPercentage=commissionPercentage;
            public var frmAmount:String;
            public var toAmount:String;
            public var commissionPercentage:String;
    main mxml:
    [Bindable]
                private var tasks:ArrayCollection;
                private static const ADD_TASK:String= "";
                private function init():void
                    tasks = new ArrayCollection();
                    tasks.addItem(new Task("0","1000","0"));
                    tasks.addItem({frmAmount:ADD_TASK});
                private function checkEdit(e:DataGridEvent):void
                    // Do not allow editing of Add Task row except for
                    // "Click to Add" column
                    if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                        e.preventDefault();
                private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                        var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var txtIn1:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var txtIn2:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var dt:Object = e.itemRenderer.data;
                        // Add new task
                        if((txtIn.text) != ADD_TASK)
                            var x:String=String(txtIn.text);
                            tasks.addItemAt(new Task("", "", ""), e.rowIndex);
                        // Destroy item editor
                        commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                        e.preventDefault();

    Venktesan,
    You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
    ORIGINAL:
    if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    EDITED:
    if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    Thanks
    Pradeep

  • How to use combobox to filter datagrid in Flash Builder 4?

    Hi,
    I've been working through the TestDrive application with Flash Builder 4 and I would like to learn how to filter a datagrid using a combobox.  I've googled the subject and results for many different versions of Flash, some which look like they will take a considerable amount of time to implement.  I'm hoping with Flash Builder 4 there is a straight-forward way to do this without writing pages of code.
    I think I may be close to getting this working by passing the combobox value into a PHP script which queries the database with a WHERE clause.
    Thakns,
    David

    I was able to get the data returned from a PHP call into an array by placing the following in the service result handler:
       public var myEmployeesArray : Array;
       [Bindable]
       public var myEmployeesDataProvider : ArrayCollection;
        myEmployeesArray = mx.utils.ArrayUtil.toArray(event.result);
        myEmployeesDataProvider = myEmployeesArray[0];   //data provider for the datagrid
    Not certain how to use filterfunction yet though.  I started to read this page but need to work on it more: http://cookbooks.adobe.com/post_Using_the_to_ArrayCollection_s_filterFunction-5441.html
    I'd like to filter only one field in the ArrayCollection.
    Also, for anyone else who may be learning while reading this, I found the following page helpful in figuring out how to load the PHP service return data into an array:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=415
    David

  • Attach Dynamic ComboBox

    Hi dear,
    I am still working with Jdev9i and need to attach a dynamic combo box to the grid in applet. i found an oracle class called StaticGridComboBox(), but this good only for a static combo. Is there a class/method to attach a dynamic combo to the grid? or any work around?
    Thanks

    Frank,
    I meant a combobox that could be bound to a table.
    Thanks.

  • Database driven combobox itemrenderer in DataGrid

    Hi
    I created a database driven combobox itemrenderer, code see below:
    The data is loaded and shown correctly, but when I change the combobox, suddenly a "0" appears:
    I can see in the debugger in combobox1_changeHandler, that the correct data is taken from the combo "this.selectedItem.data=3;" and written to "data.professionGroup", (changed from "1" to "3")
    but then when the code jumps to set data the "value.professionGroup" is "0"?!?!
    Thank yor for any pointers!
    The DataGrid:
        <mx:DataGrid id="personDg" dataProvider="{sm.persons}" width="100%" height="100%" editable="true">
             <mx:columns>
                <mx:DataGridColumn headerText="firstName" dataField="firstName"/>
                 <mx:DataGridColumn headerText="lastName" dataField="lastName"/>
                 <mx:DataGridColumn headerText="professionGroup" dataField="professionGroup" editable="true" editorDataField="data"
                     rendererIsEditor="true"
                     itemRenderer="com.xxx.view.components.combobox.ProfessionGroupCombo">
                 </mx:DataGridColumn>
            </mx:columns>
         </mx:DataGrid>
    The ItemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:ComboBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"
         change="combobox1_changeHandler(event)"  initialize="combobox1_initializeHandler(event)" >
             <fx:Script>
                 <![CDATA[
                     import mx.controls.dataGridClasses.DataGridListData;
                     import com.myfim.model.ShellModell;
                       import mx.events.ListEvent;
                        import mx.events.FlexEvent;
                     [Bindable]
                     private static var sm:ShellModell=ShellModell.getInstance();
                        public function setSelectedItemByValue(val:int):void{                                                                   
                             this.selectedIndex = -1; // Show prompt if value is not found
                             for (var i:int=0;i<this.dataProvider.length;i++){
                                if(this.dataProvider[i].data == val){
                                     this.selectedIndex = i;
                                     break;
                             }// for
                     override public function set data(value:Object):void{
                        super.data=value; // value is the VO!
                         setSelectedItemByValue(value.professionGroup);
                     protected function combobox1_changeHandler(event:ListEvent):void
                        data.professionGroup=this.selectedItem.data;                   
                        // I can see in the debugger that "data.professionGroup" gets the correct data f.e. ="3" , but if it jumps to the "set data" the                          value.professionGroup is "0" !??     
                    protected function combobox1_initializeHandler(event:FlexEvent):void
                        this.dataProvider=sm.comboData.professionGroupAc;  // AC of (label, data)
                 ]]>
             </fx:Script>
    </mx:ComboBox>

    Hi,
    yupiiee! I found the answer by myself, I had to change
    editorDataField="data" to editorDataField="value"
    Thats all! Then it works!
    Martin Zach

  • How to get the values of 2 dynamic comboboxes in one jsp to another jsp?

    I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
    Select.jsp:
    <%@ page language="java" import="java.sql.*" %>
    <%!
         Connection con = null;
         Statement  st  = null;
         ResultSet  rs  = null;
         String     sql = null;
         void addItems(javax.servlet.jsp.JspWriter out, String sql)
           try{     
              rs = st.executeQuery(sql);
              while( rs.next() )
                   out.println("<option>" + rs.getString(1) + "</option>");               
         }catch(Exception e)
                   System.out.println(e);
    %>
    <HTML>
    <HEAD>
    <TITLE>JSP WITH  MULTIPLE FORMS</TITLE>
    <script language="javascript">
              function checking()
                        form1.submit();
         </script>
    </HEAD>
         <body>
             <center>
             <b><font size="5" color="#333399">Staff ID:</font></b></center>
                     <FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
                         <p align=center>
                         Details of Staff :  
                       <SELECT 1 NAME="type" onchange="checking();">
                                    <option> Administrator </option>
                              <option> OfficeAssistent </option>
                              <option> Clerk </option>
                                  </SELECT 1>
                          </p>
    </FORM>
                      <FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
                      <center>
                          <TABLE><TR><TD>Staff ID:</TD>
                                 <TD><SELECT 2 NAME="staff_id">
                    <%    
            String type = request.getParameter("type");
            try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
            catch (ClassNotFoundException ex) {
                   System.out.println(ex);
            catch (SQLException ex)
                System.out.println(ex);
         st  = con.createStatement();
         sql = "select staff_id from "+type+"";
         addItems(out, sql);
    %>
              </SELECT 2>
           </TD>
         </TR>
    </table></center>
    <h2> Details of <%= type + "s" %> </h2>
                         <center><input type=submit value=ok onclick="submit();"></center>
                  </FORM>
         </BODY>
    </HTML>
    welcome1.jsp
    <center><h1>WEL COME</h1></center>
    <%    
            String type = request.getParameter("type");
            String sid = request.getParameter("staff_id");
    %>
    <h2> Details of <%= type + "s" %> </h2>
    <h2> Details of <%= sid %> </h2>

    <SELECT 1 NAME="type" onchange="checking();">
                                    <option value = "0"> Administrator </option>
                              <option value = "1"> OfficeAssistent </option>
                              <option value = "2"> Clerk </option>
                                  </SELECT 1>

  • Error while creating a custom combobox for Spark DataGrid

    I am getting the following run time error:
    Error: Required skin part openButton cannot be found.
        atspark.components.supportClasses::SkinnableComponent/findSkinParts() [E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\componen ts\supportClasses\SkinnableComponent.as:671]
        atspark.components.supportClasses::SkinnableComponent/attachSkin()[E: \dev\hero_private_beta\frameworks\projects\spark\src\spark\components\ supportClasses\SkinnableComponent.as:646]
        atspark.components.supportClasses::SkinnableComponent/validateSkinCha nge()[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\com ponents\supportClasses\SkinnableComponent.as:406]
        atspark.components.supportClasses::SkinnableComponent/commitPropertie s()[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\compo nents\supportClasses\SkinnableComponent.as:420]
         atspark.components.supportClasses::ListBase/commitProperties()[E:\dev  \hero_private_beta\frameworks\projects\spark\src\spark\components\supp  ortClasses\ListBase.as:808]
        atspark.components::List/commitProperties()[E:\dev\hero_private_beta\ frameworks\projects\spark\src\spark\components\List.as:954]
        atspark.components.supportClasses::DropDownListBase/commitProperties( )[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\compone nts\supportClasses\DropDownListBase.as:504]
        atspark.components::ComboBox/commitProperties()[E:\dev\hero_private_b eta\frameworks\projects\spark\src\spark\components\ComboBox.as:644]
        atmx.core::UIComponent/validateProperties()[E:\dev\hero_private_beta\ frameworks\projects\framework\src\mx\core\UIComponent.as:8095]
         atmx.managers::LayoutManager/validateClient()[E:\dev\hero_private_bet  a\frameworks\projects\framework\src\mx\managers\LayoutManager.as:934]
        atmx.core::UIComponent/validateNow()[E:\dev\hero_private_beta\framewo rks\projects\framework\src\mx\core\UIComponent.as:7953]
        atspark.components.supportClasses::GridLayout/layoutItemRenderer()[E: \dev\hero_private_beta\frameworks\projects\spark\src\spark\components\ supportClasses\GridLayout.as:1808]
        atspark.components.supportClasses::GridLayout/createTypicalItemRender er()[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\comp onents\supportClasses\GridLayout.as:460]
        atspark.components.supportClasses::GridLayout/updateTypicalCellSizes( )[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\compone nts\supportClasses\GridLayout.as:514]
        atspark.components.supportClasses::GridLayout/layoutColumns()[E:\dev\ hero_private_beta\frameworks\projects\spark\src\spark\components\suppo rtClasses\GridLayout.as:570]
        atspark.components.supportClasses::GridLayout/measure()[E:\dev\hero_p rivate_beta\frameworks\projects\spark\src\spark\components\supportClas ses\GridLayout.as:230]
         atspark.components.supportClasses::GroupBase/measure()[E:\dev\hero_pr  ivate_beta\frameworks\projects\spark\src\spark\components\supportClass  es\GroupBase.as:1109]
        atmx.core::UIComponent/measureSizes()[E:\dev\hero_private_beta\framew orks\projects\framework\src\mx\core\UIComponent.as:8383]
        atmx.core::UIComponent/validateSize()[E:\dev\hero_private_beta\framew orks\projects\framework\src\mx\core\UIComponent.as:8307]
        atspark.components::Group/validateSize()[E:\dev\hero_private_beta\fra meworks\projects\spark\src\spark\components\Group.as:956]
        atmx.managers::LayoutManager/validateSize()[E:\dev\hero_private_beta\ frameworks\projects\framework\src\mx\managers\LayoutManager.as:659]
        atmx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\hero_priv ate_beta\frameworks\projects\framework\src\mx\managers\LayoutManager.a s:793]
        atmx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\h ero_private_beta\frameworks\projects\framework\src\mx\managers\LayoutM anager.as:1157]
    Here is my combobox:
    package
        import mx.controls.listClasses.BaseListData;
        import mx.controls.listClasses.IDropInListItemRenderer;
        import spark.components.ComboBox;
        public class sparkComboRendererDataGrid extends ComboBox implements IDropInListItemRenderer
            public function sparkComboRendererDataGrid()
                super();
            public function get listData():BaseListData
                return null;
            public function set listData(value:BaseListData):void
            override public function set dataProvider(value:Object):void
                super.dataProvider = value;
                // This may get called before dataProvider is set, so make sure not null and has entries
                if (value!=null && value.length)
                    // Got it, set flag
                    bDataProviderSet = true;              
    and here is the implementation:
    var PersonnelPerson:ClassFactory = new ClassFactory(sparkComboRendererDataGrid);
    PersonnelPerson.properties = {labelField : "person", dataProvider :
    new XMLListCollection(dataList.consistcrew)};
    var col:GridColumn = GridColumn(personnel.columns.getItemAt(0));                   
    col.itemRenderer = PersonnelPerson;
    Please help.
    Thanks

    Actually, after adding the following code it started working:
    import spark.skins.spark.DropDownListSkin;
    override public function stylesInitialized():void
          super.stylesInitialized();
          this.setStyle("skinClass", DropDownListSkin);

  • Implicit coercion of a value of type String to an unError while Adding Dynamic Rows To Flex DataGrid

    Hi friends
    I  want to add interger for in next next rows while clicking tab  button,one i enter all the values in one row if i press tab means next  row will be editable.for making that i added the following code.i have  some error shows like this
        [Bindable]
                    private var tasks:ArrayCollection;
                    private static const ADD_TASK:int= "";
                    private function init():void
                        tasks = new ArrayCollection();
                        tasks.addItem(new Task(0.01,100000,0));
                        tasks.addItem({frmAmount:ADD_TASK});
                    private function checkEdit(e:DataGridEvent):void
                        // Do not allow editing of Add Task row except for
                        // "Click to Add" column
                        if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                            e.preventDefault();
            private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                    var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var dt:Object = e.itemRenderer.data;
                    // Add new task
                    if(parseInt(txtIn.text) != ADD_TASK)
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----->Multiple markers at this line:
                                                                                                                             -1067: Implicit coercion of a value of type String to an unrelated type int.
                                                                                                                                -txtIn
                    // Destroy item editor
                    commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                    e.preventDefault();
            ]]>
    Please help if any suggession
    Thanks in advance
    B.Venkatesan

    The error message indicates the problem fairly clearly.  _feed_list is defined as a ComboBox in your first line of code.  You are passing that as an argument in your populate(_feed_list) line of code.  However, the populate function is expecting an XMLList object to be passed, not a ComboBox.
    You probably really mean to be using...
              populate(feed_items);
    since that is the only XMLList to be found

  • Using dynamic column name in datagrid selectedItems

    Hi
    I have a datagrid loaded with 2 columns. Allowmultiselect is turned on.
    Based on the values selected at run time, I get the corresponding selected column name and its values and shown it on HTML screen.
    // grp is datagrid
    // dgrcl is a data grid column
    // selflds is an array which has 0,1,2,3 values
    //selflds[0] = name,selflds[1]=age
    for (var l:int=0; l<grp.columnCount; l++)
    dgrcl =grp.columns[l];
    selflds[l] = dgrcl.dataField;
    // srhVals will have only one selected value at any point
    // getting the corresponding selected column name and its value
    var  srhVals:String;
    srhVals = String(grp.selectedItem[selflds[1]]);
    I am trying to achieve the above selection instead by .selectedItems somthing like this below. By doing like this, I will get all the selected items but not only one. If i try below syntax, i get error. Any one has ideas on how to do.
    srhVals = String(grp.selectedItems.selflds[1]);

    Hi
    I got my mistake, there should be no dot operator after selectedItems;
    I got a solution - it goes like this:
    for(var g:int=0;g<grp.selectedItems.length;g++)
    srhVals = srhVals + String(grp.selectedItems[g][selflds[1]]);
    So the complete scenario is like this:
    Datagrid:
    Name      Age    
    a               20
    b               30
    c               40
    d               50
    I am selecting b,d in UI. At run time, I get programatically the selecteditem column name as "Name", loop through the selecteditems and store the value in srhVals as b,d.
    b,d will be finally shown in UI.

Maybe you are looking for

  • Transfer Posting upon UD of HU linked to inbound delivery

    I have configured the system to [create inspection lots upon packing inbound deliveries|http://help.sap.com/erp2005_ehp_04/helpdata/En/2d/584bcba70f11d2b44e006094b9b9dd/frameset.htm] and this is working well.  However, when making a usage decision on

  • HT3606 please help me to upgrade my mac osx 10.5.8 to mountain lion

    please help me to upgrade my mac osx 10.5.8 to mountain lion. i am not able to do it.becoz i am not having app store.

  • Safari 3.0: How do I force all links to open in tabs without using cmd?

    In a number of other browsers it's easy to set all links to open in tabs. I don't want any separate windows to open and I don't want to have to use the keyboard to force every single link into a tab. How do I get Safari to do strictly tabbed browsing

  • Problem communication with Web Service

    Hello, today i've got a really illogical error. I will try to explain: I have got a procedure, which connect with a web service. The Code of this function is: °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

  • Bridge Webgalerie in Muse homepage integrieren

    Hallo! Ich habe eine Bridge Webgalerie in Muse über einen Hyperlink integriert, finde aber keine  "zurück Button"  bzw. "zur Homepage Button". Gibt es diese Funktion, wenn nicht wie kommt der Kunde von der Webgalerei mit einem Klick wieder zur Homepa