Help regarding Combo Box

Hi,
I am trying to create a combo Box at run time.Can anybody tell me how do I get the value the user has selected and then assign it to a EditText. I am doing the coding in C#.
Thanks
Nirmala B.

Something like that ?
  oNewItem = oForm.Items.Item("12"); // get my combobox in oNewItem
  oCombo = (SAPbouiCOM.ComboBox)oNewItem.Specific; // get the combobox
  string qry = oCombo.Selected.Description; //get the selected description in qry
Hth
Quentin

Similar Messages

  • Need help on combo box problem

    hi ,
    i have two combo box..... eg..c1,c2
    i retrieved data from database to display it in combo box c1.now my problem is using the selected value from combo box c1 i have to display the respective value in c2..
    eg.
    if Product type=injection (in combo box c1)
    then
    in c2 the product name for injection available should be displayed by retrieving it from database...
    this is my code
    <%
    //query for selecting the values from the database
    stm=con.createStatement();
    ResultSet rs=stm.executeQuery("select Dosageform from ProductMaster");
    %>
    <!-- Displaying the values in the combo box -->
    <form name="form1" method="post" action="">  <select name="eid" id="eid" onchange="display(this)">
    <%
    while(rs.next())
    %>
    <OPTION VALUE=""><%=rs.getString("Dosageform")%></OPTION>
    <%
    %>
    </select>
    <select name="combo2">
                   </select>i don't know how to write the function display for this....
    can any one help me...
    Thanks
    kalai

    hi
    thanx to all who sees my forum.
    now i was able to create a depenent box but now i'm facing two problems
    1. when i submit the form my previous value from the combo box is not selected
    2. when i first load the page the value in the 2nd combo box doesn't has the value as null...
    my code
    function display()
      var index=document.form1.drug.value;
      document.form1.hid.value=index;
      form1.submit();
    function refresh()
       var val;
       val=document.form1.hid.value;
       drug.SelectedIndex=value;
    <div class="tr1">
    <td>Product Name</td>
    <%
    //query for selecting the values from the database
       rs=stm.executeQuery("select DrugName from ProductMaster");
    %>
    <!-- Displaying the values in the combo box -->
    <form name="form1" method="post" action="">
    <select name="drug" id="drug" onChange="display()">
    <option value="">-- select -- </option>
    <%
    while(rs.next())
    %>
    <OPTION VALUE="<%=rs.getString("DrugName")%>"><%=rs.getString("DrugName")%></OPTION>
    <%
    %>
    </select>
    <input type="hidden" name="hid">
    </div>
    </tr>
    <tr>
    <div class="td1">
    <td>NDC code #</td>
    <%
    //query for selecting the values from the database
    String sql1 = "SELECT ProductCode from ProductMaster where DrugName='"+request.getParameter("hid")+"' ";
    rs=stm.executeQuery(sql1);
    %>
    <SELECT NAME='ndc'>
    <% while (rs.next())
    String val1=rs.getString("ProductCode");
    out.println ("<OPTION VALUE='" + val1 + "'>" + val1 + "</OPTION>");
    %>
    </div>i don't know wht to do...
    pls help me as soon as u can...
    Thanks & Regards
    kalai

  • Need help @ listening combo box

    Hi Everyone,
    below is my code. Please find my question between '?'ed lines.
    // CREATE COMBO BOX
    if(obj.equals(CSV_COMBO_BOX))
         _combobox[_combobox_count] = new JComboBox();
         //get possible value for combo box
         String [] possible_values = get_possible_values(val[i]);
         for(int i=0; i < possible_values.length; ++i)
         _combobox[_combobox_count].addItem(possible_values[i]);
         //set the default value to usr_val[i]
         _combobox[_combobox_count].setSelectedItem(usr_val[i]);
         // add to panel
         panel.add("tab",_combobox[_combobox_count]);
         // listner
         _combobox[_combobox_count].addItemListener(new ItemListener(){
              public void itemStateChanged(ItemEvent e)
    // ? I WANT TO UPDATE usr_val[i] here ?
    // ? how could i get the value of "i" or
    // combobox_counter in this block?????????
    // ???????????????????????????????<?????
         comboboxcount++;
    Thanks & Regards
    Vikas Talwar

    Hi Everyone,
    below is my code. Please find my question between '?'ed lines.
    // CREATE COMBO BOX
    if(obj.equals(CSV_COMBO_BOX))
         _combobox[_combobox_count] = new JComboBox();
         //get possible value for combo box
         String [] possible_values = get_possible_values(val);
         for(int i=0; i < possible_values.length; ++i)
         _combobox[_combobox_count].addItem(possible_values);
         //set the default value to usr_val
         _combobox[_combobox_count].setSelectedItem(usr_val);
         // add to panel
         panel.add("tab",_combobox[_combobox_count]);
         // listner
         _combobox[_combobox_count].addItemListener(new ItemListener(){
                public void itemStateChanged(ItemEvent e)
              // ? I WANT TO UPDATE usr_val here ?
              // ? how could i get the value of "i" or
              // _combo_box_counter in this block?????????
              // ???????????????????????????????<?????
    _combobox_count++;
    }I have two arrays: one called "val" which is an array of string arrays that you use to populate a JComboBox, and the other one is called "usr_val" that holds strings and is used to set the JComboBox default values. You want to change the default value when the selected item in the corresponding JComboBox has changed. To manage your arrays and JComboBoxes, you have
    one counter "i" which seems to count the arrays of string arrays and the array with the default strings and one counter "_combobox_count" which counts the JComboBoxes that have been genererated with the help of these arrays. Obviously, the arrays could be used to generate a different JComponent as well, in which case "i" and "_combobox_count" will have different values. Both "i" and "_combobox_count" are clearly available within the if-block, so you don�t need any extra tricks to access them. What happens if you directly access "i" or "_combobox_count" from within the "itemStateChanged"-method?
    Thanks & Regards
    Vikas Talwar

  • Need help on Combo Box

    Hi,
    I am currently developing a application using Flex. In my
    application i am using ComboxBox but i am not able to adjust the
    spacing between the values present inside the combobox. currenlty
    when the clicks on the combo box even thought there are two values
    the height looks very big. Is there way i can control it.

    hi
    thanx to all who sees my forum.
    now i was able to create a depenent box but now i'm facing two problems
    1. when i submit the form my previous value from the combo box is not selected
    2. when i first load the page the value in the 2nd combo box doesn't has the value as null...
    my code
    function display()
      var index=document.form1.drug.value;
      document.form1.hid.value=index;
      form1.submit();
    function refresh()
       var val;
       val=document.form1.hid.value;
       drug.SelectedIndex=value;
    <div class="tr1">
    <td>Product Name</td>
    <%
    //query for selecting the values from the database
       rs=stm.executeQuery("select DrugName from ProductMaster");
    %>
    <!-- Displaying the values in the combo box -->
    <form name="form1" method="post" action="">
    <select name="drug" id="drug" onChange="display()">
    <option value="">-- select -- </option>
    <%
    while(rs.next())
    %>
    <OPTION VALUE="<%=rs.getString("DrugName")%>"><%=rs.getString("DrugName")%></OPTION>
    <%
    %>
    </select>
    <input type="hidden" name="hid">
    </div>
    </tr>
    <tr>
    <div class="td1">
    <td>NDC code #</td>
    <%
    //query for selecting the values from the database
    String sql1 = "SELECT ProductCode from ProductMaster where DrugName='"+request.getParameter("hid")+"' ";
    rs=stm.executeQuery(sql1);
    %>
    <SELECT NAME='ndc'>
    <% while (rs.next())
    String val1=rs.getString("ProductCode");
    out.println ("<OPTION VALUE='" + val1 + "'>" + val1 + "</OPTION>");
    %>
    </div>i don't know wht to do...
    pls help me as soon as u can...
    Thanks & Regards
    kalai

  • Problem regarding Combo boxes in JSP

    Hi all,
    I have two combo boxes on jsp page, i want to fill the second CB by value of first CB, and both CBs have values from Database, i tried it many times but cant got solution
    plz help me its very urgent and if possible provide code plz
    thanks

    http://forum.java.sun.com/thread.jspa?threadID=597553

  • Help with Combo Box Component

    I am creating an application with comboboxes and using action
    script to load them. I can figure out how to change text color of
    the choices in the combo box, but can anyone tell if it is possible
    to make the text choices appear as different colors. For instance
    if I wanted all of the choices to be black text, but for the third
    choice down to appear red.
    Thanks for the help.

    You can set the backgroubd color if that helps.
    To set the second item to have a red background, attach this
    to the combobox:
    on(open){
    dropdown.setPropertiesAt(1,{backgroundColor:0xFF0000})
    }

  • Help with combo boxes

    I am currently building a site with flash / dreamweaver and
    am attempting to add two or three combo boxe that will display data
    and pictures from a database. Any ideas or assistance would be much
    appreciated...
    Many thanks in advance

    Sunil,
    I'm attempting to use the data binding technique but I'm perhaps not understanding exactly where this should go.  For now I'm fine with having a static array that just lives locally on the page.   Each of my combo boxes are being populated using the
         mx:Array --> mx:Object logic. 
    I need to fire off an event to a function that is able to determine which selection(s) from the combination of the two combo boxes were chooses.  I'm accomplishing that by using selectedIndex property of the combo boxes id.  I then have 'n' number of unique Array Collections that are basically a three dimensional array containing the numeric percentage that I need to display graphically.  I need my function to be able to choose the appropriate Collection based on the combination of selected index(es) and then update my column chart accordingly. 
    My other confusion is how to do use my data binding at the chart level.  So my page is really nothing more than two combo boxes and chart that I need to change dynamically as the selections in the combo boxes changes.  Eventually I will use a webservice to connect to a .jsp page that is using DAO to retrieve the values from the database but right now I'm fine with fetching them locally just so I'll know I'm on the right track. 
    If it would help I can include the snippet of the code that I'm working on.
    Thanks for your help
    -->Nash

  • Need help on combo box validation in jsf

    Hi All,
    I have a combo box with some options. User has to select one option and has to submit the form. If he doesnt select any option and submit the form i need to display an error message saying that PLEASE SELECT AN OPTION AND SUBMIT.
    I am using RATIONAL APPLICATION DEVELOPER 6.0 as my IDE.
    please help me its an urgent requirement

    On submit check if he has an option selected.
    If not do the following:
    FacesContext.getCurrentInstance().addMessage(componentId,
    new FacesMessage(FacesMessage.SEVERITY_ERROR,
    errorMessage,
    errorMessage));
    return null;
    The componentId is the id of the selectOneMenu

  • NEED HELP WITH COMBO BOX

    i am having a heck of a time writing the php and actionscript
    to get a combo box to load a list from a data base. And then once
    that list is loaded into cb_combo1 based on the users selection
    loading the appropriate list into cb_combo2 , so for example
    user is asked to select a state.
    once a state has been selected a list of schools from a
    database is loaded into the cb_combo2 based on the users selection.
    after the user selects the school , he is redirected to
    another URL.
    Let me know if anyone can help. Its for a project in school
    and i could really use the A. and the knowledge. I have been
    googleing for about 7 days now.
    Thanks all :-)
    CH

    The perfect tutorial for you:
    http://www.adobe.com/devnet/flash/articles/flash_xmlphp.html

  • Help with Combo box

    I am having problems with displaying items on a combo box.
    The combo box will allow a user to select a fixed list of values for a database column.
    I created the combo box and set the dataItemUsageMode property in the property inspector to "USE FOR UPDATE". The list is bound to the corresponding column of the query RowSetInfo.
    In the code, I hard coded the items to be displayed using comboboxName.addItem(). When I run the form, the list of hard coded values shows up. However, when I select an item, the selected item is not displayed on the screen.
    Could anyone tell me what I am doing wrong?
    null

    I had a problem like this when I inserted a new row into the given Rowset.
    Try setting initial value for the attribute that you are using for update.
    eg. if you have this:
    comboBoxControl1.setDataItemNameForUpdate("infobus:/oracle/sessionInfo1/rowSetInfo1/Status");
    comboBoxControl1.addItem(new String("Silver"));
    comboBoxControl1.addItem(new String("Gold"));
    comboBoxControl1.addItem(new String("Platinum"));
    set the attribute as follows:
    StatusrowSetInfo1.getImmediateAccess().setValue(new String("Silver"));
    or any other way you can set that attribute.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by kms98 ():
    I am having problems with displaying items on a combo box.
    The combo box will allow a user to select a fixed list of values for a database column.
    I created the combo box and set the dataItemUsageMode property in the property inspector to "USE FOR UPDATE". The list is bound to the corresponding column of the query RowSetInfo.
    In the code, I hard coded the items to be displayed using comboboxName.addItem(). When I run the form, the list of hard coded values shows up. However, when I select an item, the selected item is not displayed on the screen.
    Could anyone tell me what I am doing wrong? <HR></BLOCKQUOTE>
    null

  • Help regarding action box

    hey gurus,
    Can u tell me how to utilize the action box option and how to link the follow up actions.
    Regards,
    abhishek

    Hi,
    Once you reach the node following the path given in my earlier mail you can click on "define follow up functions". In next screen you will find list of all Notification types. You can choose your Notification type and click on Activities. Here you need to define an activity and assign a "Function Mopdule" to that activity. You can also assign an "icon" to this follow up funtion. You need to assign a code and code goup also using which system will create an Activity or Task when you execute this function.
    Once you complete this you can see the icon assigned here in the screen of your Notification in your action box.
    As far as getting a pop up is concerned, I do not think there is a function module provided by SAP for this.
    SM

  • Default Selection in Combo Box

    Hi,
    I have a query regarding combo box. I have populated combo box using UserDataSources. Is it possible to make a default selection of an Item in combo box.
    Regards
    Ronald

    Hi Ronald,
                   I  hope the following code helps
                           Dim oComboVal1 As SAPbouiCOM.ComboBox
                           Dim oCol As SAPbouiCOM.Column
                           oCol = oMatrix.Columns.Item("V_12")
                            oComboVal1 = oCol.Cells.Item(Row).Specific
                            oComboVal1.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
                            here
    Regards
    V.Rangarajan

  • Prob in retaining spaces in Combo Box, PLEASE HELP ASAP!!

    Hi
    In the application that I am working on, I have developed a screen wherein I populate the names of some schemes from the database, in a combo box (<Select><option></option></Select>).
    A particular scheme in the database has a multiple-word name with double spaces between the two words, or rather between the last of the two words and the brackets.
    e.g. Help CRY (Child Relief & You).
    Now, when this name is fetched fro the database, the double spaces between the CRY and ( are retained but when I display them in the combo box, i.e. between the <option> tags, somehow the double spaces disappear.
    Further on, in my servlet, I retrieve the same scheme name from the combo box and try to fetch some other entries from the database. At that point, since one of the spaces has disappeared, there is no database match found for the scheme name selected and I'm unable to proceed. This problem arises in the case of any number of spaces between the words while populating the combo box. It however works fine when I remove the double spaces and retain a single space between the words.
    Please let me know ASAP if combo boxes eat up such spaces and convert any number of spaces into a single space as a property or is something wrong with the JSP I have here. If this problem can never be resolved as a rule, then please tell me so that I can force the data providers to make sure they filter out such double spaces before sending the data to our databases.
    I'll be very grateful if your can help me out asap as we have to put up the site at the earliest possible date.
    Thanks a lot,
    Soumya

    why not you try to set the option value, like this:
    <option value="Help CRY (Child Relief & You)">words you wan display</option>
    Think if the display is not right it will not affect you from extracting the value.
    Regards,
    Jas

  • ABAP Webdynpro cannot display value help, combo box properly in IE ?

    Hi WDA expert,
    I have problem developing webdynpro in NW 7.0 EHP1 SPS02. All the combo box, value help, drop down input did not properly display using IE 7.0 / 8.0. It is something like create another  blank input beside the original object.
    but everything ok if i am using mozilla firefox.
    I am not sure what is the problem with this.
    Please help.
    Thank You and Best Regards
    Fernand.

    Hi Thomas,
    Thank you for your response, But i am still not able to solve the problem. Let me give you more detail information regarding this issue.
    are you using the Portal? The other poster in this thread seems to think so, but I don't see anything in your postings to indicate that. IE7 is supported on your release/SP level. IE8 is not supported until SPS5.
    => I am not using portal it is just normal test from SAP GUI. I am using IE 8.0.6001.18702. So far i have tested the sample webdynpro "WDR_TEST_SELECT_OPTIONS" to 4 different server (PID, PIQ, ECD, ECQ) all using the same version NW 7.0 EHP 1 SPS02. (i have check for ABAP and BASIS package). The problem only occur in PID (Initially the icm service is not start so i use transaction SICF to start the webdynpro service) not sure if there is missing java script library ?
    Please refer in this link for the different result screen capture below:
    http://i802.photobucket.com/albums/yy310/pisuper/WDA_DEV.jpg   --> error in PID
    http://i802.photobucket.com/albums/yy310/pisuper/WDA_QA.jpg    -
    > success in PIQ, ECD, ECQ
    I would recommend clearing your browser cache and the server side cache. For the server side cache go to transaction SMICM and choose Administration->ICM->Exit Hard->Global.
    I have restarted the whole server and i did again from SMICM. But still having the same problem like in the screen capture.
    Are you using a standard or customized theme?
    I am using standard theme base on demo "WDR_TEST_SELECT_OPTIONS"
    Base on my latest investigation seems like those 3 success server PIQ, ECD and ECQ always download this file ls_ie6.nosprite.css in the internet temporary directory, but then no for PID. 
    is that any idea or suggestion that i can try to solve this problem. it seems like some configuration was missing for the standard theme in PID
    Thank You and Best Regards
    Fernand Lesmana
    Edited by: Fernand Lesmana on Jun 16, 2010 3:52 PM

  • Please help with: A date split into 3 Combo Boxes ....

    Can someone help me with this Please?
    I have a date for a Date of Birth i.e. dd/MM/yyyy
    I need to split it up an place it into 3 combo boxes i.e. Day Combo, Month Combo and Year Combo.
    This is the code I have to set the combo boxes, now I need to bring it back into the combo boxes.
    can someone help me with the code as I need to have this finish on friday and I am running out of time. I just dont know what to do PLEASE SOMEONE HELP...
    Thanks
    Craig
    // List days
      private void DayOfTheMonth(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 1; index < highNumber; index++) {
          comboBox.addItem(String.valueOf(index));
      private void DaySpecificComboBox()
        DayOfTheMonth( 32, DayjComboBox);
    // List Months
      private void Month(){
        MonthjComboBox.addItem("");
        MonthjComboBox.addItem("January");
        MonthjComboBox.addItem("February");
        MonthjComboBox.addItem("March");
        MonthjComboBox.addItem("April");
        MonthjComboBox.addItem("May");
        MonthjComboBox.addItem("June");
        MonthjComboBox.addItem("July");
        MonthjComboBox.addItem("August");
        MonthjComboBox.addItem("September");
        MonthjComboBox.addItem("October");
        MonthjComboBox.addItem("November");
        MonthjComboBox.addItem("December");
    //List Years
      private void Year(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 2002; index > highNumber; index--) {
          comboBox.addItem(String.valueOf(index));
      private void YearSpecificComboBox()
        Year( 1900, YearjComboBox);
    private String StringFromDateFields(){
        int month =1;
        if (MonthjComboBox.getSelectedItem().equals(JANUARY))
          month = 1;
        else
          if (MonthjComboBox.getSelectedItem().equals(FEBRUARY))
            month = 2;
          else
            if (MonthjComboBox.getSelectedItem().equals(MARCH))
              month = 3;
            else
              if (MonthjComboBox.getSelectedItem().equals(APRIL))
                month = 4;
              else
                if (MonthjComboBox.getSelectedItem().equals(MAY))
                  month = 5;
                else
                  if (MonthjComboBox.getSelectedItem().equals(JUNE))
                    month = 6;
                  else
                    if (MonthjComboBox.getSelectedItem().equals(JULY))
                      month = 7;
                    else
                      if (MonthjComboBox.getSelectedItem().equals(AUGUST))
                        month = 8;
                      else
                        if (MonthjComboBox.getSelectedItem().equals(SEPTEMBER))
                          month = 9;
                        else
                          if (MonthjComboBox.getSelectedItem().equals(OCTOBER))
                            month = 10;
                          else
                            if (MonthjComboBox.getSelectedItem().equals(NOVEMBER))
                              month = 11;
                            else
                              if (MonthjComboBox.getSelectedItem().equals(DECEMBER))
                                month = 12;
                              String
                              DOB = DayjComboBox.getSelectedItem()+"/"+String.valueOf(month)+"/"+YearjComboBox.getSelectedItem();
                              return DOB;

    Thanks for your time.
    I could not get that to work ??
    I have come up with this code whitch seams to work. Thought you may like to see it
         String dobxml = xmlDoc.getValueOf(clientInfo, "DOB");
          String dob = dobxml.replace('/', ' ');
          System.out.println(dob);
          StringTokenizer tokenizer = new StringTokenizer(dob);
          String day = tokenizer.nextToken();
          String month = tokenizer.nextToken();
          String year = tokenizer.nextToken();
          System.out.println(dob);
          DayjComboBox.setSelectedItem(day);
          MonthjComboBox.setSelectedIndex(Integer.parseInt(month));
          YearjComboBox.setSelectedItem(year);ps thankyou
    Craig

Maybe you are looking for

  • Mac os 10.4.10 - problems with slimdevice's squeezebox!!!

    hi all - hoping you can help since software updating on sunday morning i cannot get my mac to stream my squeezebox - i checked the system preferences and the stream was off - clicked start then a couple of seconds later it reverted to off again can a

  • Trouble with flash preview of PDF documents, embedding.

    Yesterday, I noticed that the embedded PDF documents that I have posted on my blog weren't loading. The message in the embed window reads: 'Unable to Create Flash Preview. Please download to view in the native application.' In Acrobat.com, when I try

  • Unassigned Status Of Standby Redo Log Files

    I created 2 standby redo log groups, and use LGWR in primary site to transfer redo data, all are good. But when I query the V$STANDBY_LOG view, I found that the status column of my both standby redo logs is UNASSIGNED". also sequence# THREAD# and all

  • Oracle 9iAS v1.0.2.2.1 iSetup.exe file

    Hello! Could anyone arrange me a copy of a working iSetup.exe file for Oracle 9iAS v1.0.2.2.1, because the one that i downloaded does not work at all when i double click on it! I downloaded the iSetup.exe file that corrects the CD-ROM problem, but i

  • HR Download Time Data - Employee Remuneration Info

    Hi, We are using the program H00RSM_CLASS_TIMEDATA_DOWNLOAD to publish the Idoc HRSM_C01, in order to transfer time data to a external payroll. However, we can see that it contains a segment called E1HRSM_TIM_2010 that is never populated. Do you guys