Filter function causing 0 items in combo box

HI there, I have combobox with the dataProvider set up like below
    <mx:ComboBox rowCount="10" id="selectUser" 
                    dataProvider="{VO.getInstance().clientsResultForAddTrade}" width="258"
                    x="28" y="10" >        
                </mx:ComboBox>
in the VO class I have some code that calls the filter function (when clientsResultForAddTrade is refreshed in the clientsDataChangeHandler) when the clientsResultForAddTrade data changes.
      private function clientsDataChangeHandler( event:PropertyChangeEvent ):void{
           clientsResultForAddTrade.refresh();
        public function VO(caller:Function=null)
            if (caller != VO.getInstance)
                throw new Error("Singleton is a singleton class, use getInstance() instead");
            if (VO.instance != null)
                throw new Error("Only one Singleton instance should be instantiated");
            //put instantiation code here
            clientsResultForAddTrade.filterFunction = clientAuthorisedFilterFunction;
             activityWatcher = ChangeWatcher.watch( this, "clientsResultForAddTrade", clientsDataChangeHandler);
            private function clientAuthorisedFilterFunction(item:Object):Boolean
                var b:Boolean =  item.status == 'Authorised';
                return item.status == 'Authorised';
However there are 0 items in the selectUser combobox after the filter function is called, I have checked that it returns true when item.status == 'Authorised'
Please advise, 10 points available

Could it be a problem with the way I assign the data in the first place?
private function handleGetClients(event:ResultEvent):void
                VO.getInstance().clientsResult=event.result as ArrayCollection;
                //the following has a filter function in the model that automaticly refreshes
                VO.getInstance().clientsResultForAddTrade.source = (event.result as ArrayCollection).source;

Similar Messages

  • How to update items in combo box programmat​ically

    I have a problem on updating items in combo box programmatically, such as add or remove a item from the list. I can add or delete without any problem once the vi is running. I can see it is changed by pressing drop button. But after I close the vi and rerun it, the change I did last time is lost. It seems it not permenatly change the list. Anyone has an idea?

    If you are changing the list programmatically why do you believe that it should be permanent? If it's permanent, why are you changing it programmatically? Doesn't make a whole lot of sense.
    If you're talking about saving the values as "default" in the same way you do with the development environment, you cannot do this with an EXE. This is a FAQ. You have to update the list programmatically, saving the "new" default values to file.

  • How to select an item in combo box...!

    How to select an item in combo box in order to appear in a box of text (programmed in VB.Net for SAP Business One).

    Hi Carlos,
    I am not sure if this is what you want, but here's an example of selecting a value in a combo box. This is the item master data window and I'm changing Item Type to Labor.
            Dim oCombo As SAPbouiCOM.ComboBox
            Dim oForm As SAPbouiCOM.Form
            oForm = oApplication.Forms.ActiveForm
            oCombo = oForm.Items.Item("214").Specific
            oCombo.Select("L", SAPbouiCOM.BoSearchKey.psk_ByValue)
    Hope it helps,
    Adele

  • Selecting item in combo box itemEditor, after passing it's dataprovider from a popup window

    Hi..
    I have a datagrid which has a combo box itemeditor in the first column. When I click on the combobox, there is an item called 'Search'. When this is selected, a pop up window appears where we can search for some contact names. The search results are populated in List component, within the pop up and on double click of any of the names from the list, all of the list content is passed on as dataprovider to the combobox itemeditor of the grid. It works fine till here. Now, how can I highlight the selected name(name on which I double click, in the list of the pop up window), as the 'selectedItem' of the combobox itemeditor? ie., as soon as I double click the name, that name should appear on that combo box. As of now, wehn I double click, the search result names are passed on as dataprovider to the combobox, but a blank entry will be selected in th combobox, instead of the selected name from teh list of the pop up window. Can you please help me out on how to achieve this? I had been cracking my head for 2days now, hasn't worked out yet for me

    Hi...
    there are two events which have been used, one is doubleclick event and the other one is on selecting the item from the list and clicking on OK button(this will be the most frequently used function, i cannot use event target event for this OK button... ) . I have attached the screen shot. Please have a look at it and let me know how can i achieve that...
    I can use custom event, but the main problem is that the inline itemeditor's details are not accessible in the code.... I can access some function from within the inline itemeditor combo box using outerDocument.myFunction() (this is something like GET). Is there a similar way, to SET the data into this itemeditor?

  • VBA Userforms – Getting errors when item from combo box is not selected

    Hi there
    Thank you in advance for taking the time to check this out.
    Objective:
    I have 2 combo boxes, one is dependent on what has been selected in the first combo box (dynamic named range), they work fine except for an irritating error when the user accidentally clicks in the empty
    Cmbox_IncCategory and it won’t allow the user to go back to the
    cmbx_Category_Type box if the user forgot he had to make a selection from that first before selecting the
    Cmbox_IncCategory.
    The error that pops up is “Invalid property value”.
    I tried having text in there to say “please select from Cmbox_IncCategory first, but that didn’t fix it.
    I tried to ‘If error resume next’ but that didn’t like it either. Now I am stumped.
    Main combo box= cmbx_Category_Type
    2nd combo box (displaying a list dependent on what was selected in Main combo box)= Cmbox_IncCategory
    I know there must be a way to fix it so that if a user clicks on the combo box, but doesn’t make a selection it won’t lock up the form.
    Yes, it is a mandatory field, and I was considering using a message box to advise the user that this must be completed, but I am not sure how to do it (and avoid the errors
    Here’s the current code I have for the combo boxes.
    Me.Cmbox_IncCategory = "" 'Clears the contents of the 2nd combobox when another category is chosen
    On Error Resume Next
    'I can't seem to have the Incident Category combobox to be empty when the form is open _
    I have tried Cmbox_IncCategory.Value = "", but I get an error. I then tried Cmbox_IncCategory.text = "" _
    but also get the error. I don't know how else to get it to work .. I tried both codes in the _
    form_initialize, but get an error ... I'm stumped !
    Select Case Me.cmbx_Category_Type
    Case "Crime"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_CRIME"
    Case "Property Damage - Minor - NS"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_PROPRTY_NS"
    Case "Property Damage - Significant - S"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_Proprty_S"
    Case "Safety"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_SAFETY"
    Case "Security Breach"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_BREACH_S"
    Case "Support"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_SUPPORT"
    Case "Vehicle"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_VEHICLE_S"
    End Select
    End Sub
    I’d be really grateful if someone could help me out, or perhaps direct me to where I might find some coding that will achieve the result I am seeking.
    This links to
    My Sample form
    With much gratitude,
    TheShyButterfly
    Hope you have a terrific day, theShyButterfly

    Hi Peter,
    Thank you for your quick response :) Brave man! :)
    Both combo boxes are blank to start with (because nothing has been selected). If I click on the first combo box (cmbx_Category_Type) which lists the main events/category types, but I don't select any thing, and I click in the secondary box
    (Cmbox_IncCategory) and then click on any other control, I get an “Invalid property value” error. When I click OK on the error (a few times) and I return to the code window, it gives no indication where/what is breaking
    the code/causing the error. I have no choice but to exit the form by stopping in the code window.
    If I click on the first textbox, (cmbx_Category_Type), and then do the right thing and make a selection, then I have no problems with the secondary textbox (Cmbox_IncCategory).
    As I am not that up on VBA I am trying to follow your instructions... I have changed the code as follows, removed and replaced the rowsource name, but I encounter the very same problem.
    When I changed my code from Me.Cmbox_IncCategory="" to yours myCombo.ListIndex = -1  (changing the combo box name to reflect my combo box name) and adding the second line of code ...
    Me.Cmbox_IncCategory.ListIndex = 0 I still got the same behaviour and error.
    I even tried moving each row of the named rows down one row (so that there would be a 'blank' row which could be selected to get out of trouble, but it wasn't very successful either.
    Have you opened my form to see what happens, I included the link so whoever was looking at my problem (and yes, I have many I know), could see for themselves what it is doing/not doing.
    The code now reads as below (is this what you meant?) - the results were as I mentioned above.
    Me.Cmbox_IncCategory.ListIndex = -1 'Clears the contents of the 2nd combobox when another category is chosen
    Me.Cmbox_IncCategory.ListIndex = 0
    ' On Error Resume Next
    'I can't seem to have the Incident Category combobox to be empty when the form is open _
    I have tried Cmbox_IncCategory.Value = "", but I get an error. I then tried Cmbox_IncCategory.text = "" _
    but also get the error. I don't know how else to get it to work .. I tried both codes in the _
    form_initialize, but get an error ... I'm stumped !
    Select Case Me.cmbx_Category_Type
    Case "Crime"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_CRIME"
    Case "Property Damage - Minor - NS"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_PROPRTY_NS"
    Case "Property Damage - Significant - S"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_Proprty_S"
    Case "Safety"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_SAFETY"
    Case "Security Breach"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_BREACH_S"
    Case "Support"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_SUPPORT"
    Case "Vehicle"
    Me.Cmbox_IncCategory.RowSource = "Inc_Cat_VEHICLE_S"
    End Select
    End Sub
    I appreciate your patience :) I am growing in knowledge, but its a slow process. Please let me know if there is anything else I can help clarify for you :)
    This links to
    My Sample form
    Thanking you again
    TheShyButterfly
    Hope you have a terrific day, theShyButterfly

  • Linking items in combo box to a VI saved in pc folders

    Hello Everyone
    Could some one please tell me how could I link the items added in a combo box to the VI's saved in a folder of my pc, and if I add new item to the folder how could I update it to the combo box list automatically....
    Best Regards
    Pratheek

    Hi,
    you may continue here!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Cant edit items in combo box

    I cannot edit items in my combo box when i click on it. I just see whit box . Can anybody help me ? 

    Dear Skooty,
    in such cases, as the previous poster had said, recreating the control/VI in question usually fixes the problem. If it persists, a repair of your LabVIEW installation might be necessary.
    Please let us know of your results.
    Regards,
    Andrew Valko
    National Instruments Hungary

  • How Do I Get Item In Combo Box and Not It's Export Value?

    I created a Combo Box in Adobe pdf listing Company Names in the Item field. As well, I added an abbreviation for each Company Name in the Export Value field. When I try to display the Company Name from the Item field, it displays the Export Value.
    The Combo Box is named "Company-Name".
    In it, I have a company called "MacKenzie" within the Item Field. It's Export Value is "MFC".
    app.alert(this.getField("Company-Name").value); will display "MFC". How do I display or get the value from the Item field?

    You can use the getItemAt field method, like:
    // Get a reference to the combo box
    var f = getField("Company-Name");
    // Get the index of the selected item
    var a = f.currentValueIndices;
    // Show the item value of the selected item
    app.alert(f.getItemAt(a, false));

  • Item listener & combo boxes......please help me....thanks

    I did a applet that shows 4 jcombobox......the combo 2 is filling if the combo 1 is actioned, the combo3 is filling if the combo2 is actioned and the combo 4 have to be filled if the combo 3 is actioned.
    I did it...using item listener......it works fine....the first time....(in the console appears the lines that i specify using System.out.println).....but after...when i select any combo....i see in the console...that the itemlistener action is done several times......i don�t know why......do you have any idea or suggestion about it?............
    Thanks in advance...
    Mary
    This is the code:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import java.lang.*;
    import java.text.NumberFormat;
    import java.text.DecimalFormat;
    public class w3_a extends JApplet {
    Container contentPane;
    int i=10, j=20, k=30, l=40;
    private JComboBox jcb1;
    private JComboBox jcb2;
    private JComboBox jcb3;
    private JComboBox jcb4;
    private JTabbedPane jtp;
    private GriddedPanel jp1;
    private GriddedPanel jp2;
    public void init() {
    contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());
    add_JComboBoxes_GUI();
    add_JTabbedPanes_GUI();
    fill_combo1();
    void add_JComboBoxes_GUI() {
    jp1 = new GriddedPanel();
    jp1.setBorder( new EmptyBorder(new Insets(5, 5, 5, 5)) );
    jcb1 = new JComboBox();
    jcb2 = new JComboBox();
    jp1.add(jcb1);
    jp1.add(jcb2);
    contentPane.add(jp1, BorderLayout.NORTH);
    jcb1.addItemListener(new java.awt.event.ItemListener() {
    public void itemStateChanged(ItemEvent e) {
    System.out.println("Accion 1 - Element");
    fill_combo2();
    jcb2.addItemListener(new java.awt.event.ItemListener() {
    public void itemStateChanged(ItemEvent e) {
    System.out.println("Accion 2 - Element");
    fill_combo3();
    void add_JTabbedPanes_GUI() {
    jtp = new JTabbedPane();
    jtp.addTab("Datos Generales", new Panel_Data());
    contentPane.add(jtp);
    class Panel_Data extends JPanel {
    public Panel_Data() {
    // Primer panel de JTabbedPane de Datos Generales
    jp2 = new GriddedPanel();
    jp2.setBorder( new EmptyBorder(new Insets(5, 5, 5, 5)) );
    jcb3 = new JComboBox();
    jcb4 = new JComboBox();
    jp2.add(jcb3);
    jp2.add(jcb4);
    jtp.add(jp2);
    contentPane.add(jtp, BorderLayout.SOUTH);
    jcb3.addItemListener(new java.awt.event.ItemListener() {
    public void itemStateChanged(ItemEvent e) {
    System.out.println("Accion 3 - Element");
    fill_combo4();
    jcb4.addItemListener(new java.awt.event.ItemListener() {
    public void itemStateChanged(ItemEvent e) {
    System.out.println("Accion 4 - Element");
    void fill_combo1() {
    System.out.println("Start fill_combo1()");
    jcb1.removeAllItems();
    jcb1.addItem("combo1 " + (++i));
    jcb1.addItem("combo1 " + (++i));
    jcb1.addItem("combo1 " + (++i));
    System.out.println("End fill_combo1()");
    return;
    void fill_combo2() {
    System.out.println("Start fill_combo2()");
    jcb2.removeAllItems();
    jcb2.addItem("combo2 " + (++j));
    jcb2.addItem("combo2 " + (++j));
    jcb2.addItem("combo2 " + (++j));
    System.out.println("End fill_combo2()");
    return;
    void fill_combo3() {
    System.out.println("Start fill_combo3()");
    jcb3.removeAllItems();
    jcb3.addItem("combo3 " + (++k));
    jcb3.addItem("combo3 " + (++k));
    jcb3.addItem("combo3 " + (++k));
    System.out.println("End fill_combo3()");
    return;
    void fill_combo4() {
    System.out.println("Start fill_combo4()");
    jcb4.removeAllItems();
    jcb4.addItem("combo4 " + (++l));
    jcb4.addItem("combo4 " + (++l));
    jcb4.addItem("combo4 " + (++l));
    System.out.println("End fill_combo4()");
    return;

    Hi!!!
    Thanks by answer to me.....
    Yes ...i already understand why is happening in it.....
    I did modifications to my code to remove the listeners and after to add them....but no yet obtain my goal that the combo 2 is filling if the combo 1 is actioned, the combo3 is filling if the combo2 is actioned and the combo 4 have to be filled if the combo 3 is actioned.
    I think that at least should it to work for combo1 and combo2, because i don't know how to specify to add or remove the listener from the class de Panel_Data would be .....because i think that with:
    jcb3.removeItemListener(this);
    jcb3.addItemListener(this);
    jcb4.removeItemListener(this);
    jcb4.addItemListener(this);
    i am removing and adding the itemlistener from the main class w10_a (for combo3 and combo4)...... and not for the Panel_Data class.
    ie,
    jcb4.removeItemListener(
    //here is my doubt i don't know how to specify
    //to add or to remove the itemlistener from the
    //Panel_Data class for combo3 and combo4
    jcb4.addItemListener(
    //here is my doubt i don't know how to specify
    //to add or to remove the itemlistener from the
    //Panel_Data class for combo3 and combo4
    Well...i hope that you could help me please in give me some suggestions about it...
    Thanks in advance...
    Mary
    Here is my code modified:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import java.lang.*;
    import java.text.NumberFormat;
    import java.text.DecimalFormat;
    public class w10_a extends JApplet implements ItemListener{
    Container contentPane;
    int i=10, j=20, k=30, l=40;
    private JComboBox jcb1;
    private JComboBox jcb2;
    private JComboBox jcb3;
    private JComboBox jcb4;
    private JTabbedPane jtp;
    private GriddedPanel jp1;
    private GriddedPanel jp2;
    public void init() {
    contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());
    add_JComboBoxes_GUI();
    add_JTabbedPanes_GUI();
    fill_combo1();
    void add_JComboBoxes_GUI() {
    jp1 = new GriddedPanel();
    jp1.setBorder( new EmptyBorder(new Insets(5, 5, 5, 5)) );
    jcb1 = new JComboBox();
    jcb2 = new JComboBox();
    jp1.add(jcb1);
    jp1.add(jcb2);
    contentPane.add(jp1, BorderLayout.NORTH);
    jcb1.addItemListener(this);
    jcb2.addItemListener(this);
    void add_JTabbedPanes_GUI() {
    jtp = new JTabbedPane();
    jtp.addTab("Datos Generales", new Panel_Data());
    contentPane.add(jtp);
    class Panel_Data extends JPanel implements ItemListener {
    public Panel_Data() {
    // Primer panel de JTabbedPane de Datos Generales
    jp2 = new GriddedPanel();
    jp2.setBorder( new EmptyBorder(new Insets(5, 5, 5, 5)) );
    jcb3 = new JComboBox();
    jcb4 = new JComboBox();
    jp2.add(jcb3);
    jp2.add(jcb4);
    jtp.add(jp2);
    contentPane.add(jtp, BorderLayout.SOUTH);
    //Implementamos ActionListener para cada acci�n ejecutada
    jcb3.addItemListener(this);
    jcb4.addItemListener(this);
    public void itemStateChanged(ItemEvent e) {
    if ( e.getItemSelectable() == jcb3 ) {
    System.out.println("Accion 3 - Element");
    fill_combo4();
    if ( e.getItemSelectable() == jcb4 ) {
    System.out.println("Accion 4 - Element");
    public void itemStateChanged(ItemEvent e) {
    if ( e.getItemSelectable() == jcb1 ) {
    System.out.println("Accion 1 - Element");
    fill_combo2();
    if ( e.getItemSelectable() == jcb2 ) {
    System.out.println("Accion 2 - Element");
    fill_combo3();
    void fill_combo1() {
    System.out.println("Start fill_combo1()");
    jcb1.removeItemListener(this);
    jcb1.removeAllItems();
    jcb1.addItem("combo1 " + (++i));
    jcb1.addItem("combo1 " + (++i));
    jcb1.addItemListener(this);
    jcb1.addItem("combo1 " + (++i));
    System.out.println("End fill_combo1()");
    void fill_combo2() {
    System.out.println("Start fill_combo2()");
    jcb2.removeItemListener(this);
    jcb2.removeAllItems();
    jcb2.addItem("combo2 " + (++j));
    jcb2.addItem("combo2 " + (++j));
    jcb2.addItemListener(this);
    jcb2.addItem("combo2 " + (++j));
    System.out.println("End fill_combo2()");
    void fill_combo3() {
    System.out.println("Start fill_combo3()");
    jcb3.removeItemListener(this);
    jcb3.removeAllItems();
    jcb3.addItem("combo3 " + (++k));
    jcb3.addItem("combo3 " + (++k));
    jcb3.addItemListener(this);
    jcb3.addItem("combo3 " + (++k));
    System.out.println("End fill_combo3()");
    void fill_combo4() {
    System.out.println("Start fill_combo4()");
    jcb4.removeItemListener(this);
    jcb4.removeAllItems();
    jcb4.addItem("combo4 " + (++l));
    jcb4.addItem("combo4 " + (++l));
    jcb4.addItemListener(this);
    jcb4.addItem("combo4 " + (++l));
    System.out.println("End fill_combo4()");

  • How can i change the color of selected item in combo box, the selected item color is same as accent color, i want to change this to custom color

    <Page
    x:Class="App1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App1"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Grid Background="White">
    <ComboBox HorizontalAlignment="Left"
    BorderBrush="Black"
    Foreground="Black"
    Margin="80,272,0,0" VerticalAlignment="Top" Width="205" Style="{StaticResource BorderColor}">
    <ComboBoxItem Content="One" IsSelected="True"/>
    <ComboBoxItem Content="Two"/>
    <ComboBoxItem Content="Three"/>
    <ComboBoxItem Content="Four"/>
    <ComboBoxItem Content="Five"/>
    </ComboBox>
    </Grid>
    </Page>

    Hi,
    you can open the project in blend and then select the combobox for get the default style for combobox and for selected item . Please reference the
    set combobox style.
    Or see
    quickstart: Styling controls topic to deep understand it.
    Hope helpful for you.
    --Simon
    True mastery of any skill takes a lifetime.

  • AS3 - Combo Box making a hint for each item

    Hi Guys,
    I'm stumped. It might be something simple I'm doing wrong.
    I have an array populated by XML in a function by doing the following inside the function:
    first_special.addItem({label: xmlMenuFile.item.headers[i],data:
    xmlMenuFile.item.descriptions[i],data2: xmlMenuFile.item.hints[i]});
    The problem I'm having is trying to figure out a way so that the "data2" will fill the text field "hint_txt" on ROLL_OVER of that items name in the list.
    I've tried to placing an event listener into the function that populates the combo box but nothing helps
    // this populates the combo box label and data with the Loaded XML File. This works
    function changeHandler(ev:Event):void
         menuText_mc.heading1_txt.text = ev.currentTarget.selectedItem.label;
         menuText_mc.description1_txt.text = ev.currentTarget.selectedItem.data;
         heading1 = ev.currentTarget.selectedItem.label;
         includePrice1_mc.visible=true;
    // trying to figure out how to activate the 'hinting' function when you ROLL_OVER EACH ITEM in the 'first_special" combo box
    // and when rolling over it trace 'hello'. This DOES NOT WORK.
    first_special.addEventListener(MouseEvent.ROLL_OVER, hinting);
    function hinting(e:MouseEvent):void{
    // Should trace "hello" everytime I Roll_OVER an item in the Combo Box.     
         trace("hello");
    // calls the changeHandler function and works correctly
          first_special.addEventListener(Event.CHANGE, changeHandler);
    Any help with this would be great.
    Thanks

    For the hinting functionality, I think what you want to set up would be...
    import fl.events.ListEvent;
    function hinting(e:ListEvent):void{   
             var rowIdx:uint = e.rowIndex as uint;
             hint_txt.text = first_special.getItemAt(rowIdx).data2;
    first_special.addEventListener(ListEvent.ITEM_ROLL_OVER, hinting);
    What you had would only react to rolling over the main component, not the items, and that rollover wouldn't begin to happen until you selected an item since you buried the listener inside the change function.  Keep the listener out in the open.

  • Need to detect when an item is clicked in a combo box in flex 3

    Hello
    I am having a check box and a combo box whenever any selection is made in combo box (current selection may be same as previous selection), I need to select the check box.
    By default the 1st item in combo box is selected and check box is unselected. Now I want that while 1st item is clicked in combo box (although it is selected) , the check box must be selected.
    I have currently used the change event of combo box to do my task. But it is not working if I click on same item as selected item in combo box.
    Also, I thought to use close event of combo box, but that event dispatches in 4 situations out of which I can distinguish only 1 situation from DropDownEvent(for close).
    Please help me regarding this.
    I am using flex sdk 3.5
    Thanks in advance.

    You can use the Close Event to distinguish it.
    To pull out which item has been selected in the combo box, you use the code (in as3)
    ComboBox(event.target).selectedItem.label
    and through the the use of an if statement
    if (ComboBox(event.target).selectedItem.label == "labelName")
    you can distinguish the single situation from the others.

  • How to edit items of a combo box that is part of an array of clusters

    Hi,
    In the attached vi, I have an array of clusters, and each cluster contain two combo boxes. How do I edit the items in Combo Box 1 for all elements of the array? (All Combo Box 1 elements shall include the same items.)
    For illustration, I also included the trivila case, i.e., editing the items in a separate combo box that is is not part of an array of clusters (Combo Box 3). Please advise. Thanks.
    Peter
    Solved!
    Go to Solution.
    Attachments:
    Question Combo Box in Array of Clusters.vi ‏16 KB

    Please mark S_Mercurio's message as the solution to your question rather than your own thank you  message.  First you will have to unmark  yours by going to the option menu to the upper right of your message.

  • Using Combo box at the backend

    Hi,
    I am using combo box at the backend to filter rows to a particular destination.
    The problem is the labels are going to populate at the runtime and the selection of item in combo box is also going to populate at the run time. I have an icon which inserts eg: country in a cell, then this cells is used by combo box as a item selection(label) to filter rows from source. But unfortunately the comb box is not selecting any value i.e no item is selected dynamically. But if i manually drill down it is working but the label is not changing dynamically based on the changes in label by icon.
    For eg my data:
    Country and profit populate at run time
    Country          Profit
    India               5000
    Germany        4000
    Now i have icon which selects country (hard coded in excel) upon clicking the mouse on it and inserts in A1 suppose the value hardcoded is "India". Now this A1 is used as a "selected item" for combo box. the source to combo box is the above country and profit which populates at run time.
    Now when i execute the dashboard. The value is inserted in A1 after clicking the icon but it is not picked up by combo box as "item selected" and hence combo box does not filter any data.
    Can any pls help.
    Thank you. I will award full points for correct solution.

    Hi Monammed,
    The said functionality should work. Please check your logic one more time. Also, try using some spreadsheet components mapped to the cells in question and understand how the data is flowing during run-time. This will help you test things. Delete spreadsheets when you are done with identifying the issue.
    Lets check the combo box mapping one more time : Map the source of the combo to the entire range; labels in the combo box ONLY to the country column in the source range(typically this may be the left most column in the range); selected item should be mapped to the cell that has the destination for the icon and the type for default selection may be dynamic. Well, if there is any hard-coding of values involved anywhere, do check the spellings and other trivial things.
    Do let me know if this was helpful and if you need any more help.
    Thanks,
    Prasanna

  • Multiple combo boxes

    Hi all,
    New to this forum. Hoping someone might be able to help or
    point me in the right direction. I`m trying to use three combo
    boxes, with each combination of choices taking the user to a
    different frame. Is this possible? Any hints of where to start?
    Many thanks in advance!

    Thanks for your reply. I have now got as far as being able to
    tell which item has been selected from two combo boxes, but can`t
    seem to use them outside of this function. I tried declaring as
    global variables but still can`t get it to work.
    Heres my code:
    var myComboBox1:mx.controls.ComboBox;
    myComboBox1.removeAll();
    myComboBox1.addItem("--Choose--", "Choose");
    myComboBox1.addItem("one", "1");
    myComboBox1.addItem("ten", "10");
    myComboBox1.addItem("twenty", "20")
    myComboBox2.removeAll();
    myComboBox2.addItem("--Choose--", "Choose");
    myComboBox2.addItem("a", "a1");
    myComboBox2.addItem("b", "b10");
    myComboBox2.addItem("c", "c20")
    //Check taking the correct value from combo box 1
    myComboBox1.addEventListener("change", doChange1);
    function doChange1 (evt1){
    trace ("Combo box 1 " + evt1.target.value);
    _global.varResult_1=evt1.target.value
    //Check taking the correct value from combo box 2
    myComboBox2.addEventListener("change", doChange2);
    function doChange2 (evt2){
    trace ("Combo box 2 " + evt2.target.value);
    varResult_2=evt2.target.value
    //Try to choose which frame to go to depending on both combo
    boxes
    function checkResult(){
    //varResult_1=myComboBox1.value
    //varResult_2=myComboBox2.value
    if((_global.varResult_1==10)&(_global.varResult_2==b10)){
    gotoAndStop(10)
    function doChange(evt1) {
    trace("Value changed to 1" + _global.varResult_1);
    trace("Value changed to 2" + evt2.target.value);
    checkResult()
    Can anyone give me any hints of where I am going wrong or
    where to look for help?
    Thanks again

Maybe you are looking for

  • Error when trying to connect in synch manager

    Hi there, When trying to connect to an administration in synch manager, an error appears: SBO Error #-111: Failed to Connect to SBOCommon System: SAP Business One 2007A PL42 SQL Server 2005 SAP Webtools 2007 PL 13 Kind regards, Andy Grootens

  • How do I import video off a DVD?

    Is there a way to import video from a DVD directly into Final Cut Pro Express or do I need to download another program in order to do so. The DVDs are no copyrighted they are actually DVD I burned myself. If I do need to download another program whic

  • File sizes different on iPhone compared to iTunes

    Hi everyone, After re-syncing my phone the file sizes compared to what was showing on the colored bar at the bottom of iPhone tab in iTunes is much different than the actual sizes of the files synced onto my phone. Basically I added all of the file s

  • I need to know the reason Why Macbook Pro Mid 2012 have yellow tint screen?

    I am confusing about the reason Why Macbook Pro screen have yellow tint color? There are few reason that I got from some apple shop saleman(In Thai) and someone in discussion experience. First (1), The reason is IPS or PSL Technology made the screen

  • Network Setup for 10g RAC

    We are planning a 2 node RAC cluster with nodes in two room on a single site. The shared storage will be on a SAN which is replicated/mirrored (via the SAN) to a second SAN in the second room. Setup room A :- Node A SAN A room B :- Node B SAN A Room