Using a Multicolumn Listbox To Retrieve Selection Items

Hello, I want to use a Multicolumn Listbox as a control.  This control will popup to a user and the user can select as many items (rows) as they would like.  When they are done with selecting which items (rows) they would like to select they hit the Done key to end the selection process.  Programatically, I then would like to create an array for all of the items (rows) selected.  I have two headers: Test Code and Test Name.  I would like to programatically create an array with the Test Codes and the Corresponding Test Names.
I think I can do this with property nodes but I am a bit new to using Listboxes.  What is the best way to do this?
Thanks!

Hi,
Please check attached VI it may help you!!!
With Regards
Miraz
Kudos is better option to thank somebody on this forum
Attachments:
Multicolumn list box.vi ‏12 KB

Similar Messages

  • How to retrieve selected item details (Product Id, Quantity) in Action clas

    Hi
    I want to retrieve the selected item details (Product Id, Quantity) in my custom action class .I am calling custom action event after u2018add to cartu2019 button clicked.  I basically need these details to pass to custom BAPI. I can able to retrieve User Name and itemkey successfully.  I Tried to retrieve the product , productID using WebCatItem but I was getting run time error and when I debug the code I can see webCatItem coming  as null. Below is my code. 
    public class Z_AddToBasketAction extends BaseAction {
         /* (non-Javadoc)
    @see com.sap.isa.core.BaseAction#doPerform(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         public ActionForward doPerform(
              ActionMapping mapping,
              ActionForm form,
              HttpServletRequest request,
              HttpServletResponse response)
              throws IOException, ServletException {
              //Cache.Access access = null;
              Map returnValues = null;
              UserSessionData userSessionData =
                   UserSessionData.getUserSessionData(request.getSession());
                   BusinessObjectManager bom =
                             (BusinessObjectManager) userSessionData.
                             getBOM(BusinessObjectManager.ISACORE_BOM);
         String selectedPartnerID = bom.getUser().getUserId();
         String strItemkey=request.getParameter("itemkey");
         WebCatItem webCatItem =     (WebCatItem) request.getAttribute(
                             com.sap.isa.catalog.actions.ActionConstants.RA_WEBCATITEM);
         //If you are looking at Product attributes.
          String att =  webCatItem.getProduct()", "webCatItem.getProductID();
         ZBOM mybom = (ZBOM) userSessionData.getBOM(ZBOM.ZCUSTOM_BOM);
         return mapping.findForward("success");
    Please help
    Thanks
    Aravind
    Edited by: Aravinda Boyapati on Nov 30, 2010 10:21 PM

    Hi Arvinda,
    From which page you are trying to add products in cart? Are you selecting only 1 item at a time and then click on Add to cart button or you select more then 1 items to add into cart.
    You can ceate hidden input filed and set their value through java script when you select any item. If more then 1 items then you can create an arry and set in the request parameter and then retrieve it in your custome class.
    Regards.
    eCommerce Developer.

  • How to make a listbox selected item highlight color from code the same as if user click on item?

    Hi all,
    I have a listbox that gets filled with data when my program starts. I save the last selectedItem value so I set it when the program start again. But the color that the selected item has is not the same as if the user click on it (pictures below).
    The color when I set the selectedIndex=someItem is black on light grey (background)
    The color when the user clicks on the item is white on blue (background)
    Any way to make them both white on blue (background)?
    Thanks
    This is the user clicking on it:
    This is the code:

    I think the difference is focus.  When you use the mouse to select it also sets focus to the listbox so you would have to set focus to the listbox when you set the selected item.  How are you setting your selected item?  I think that by
    using a property to hold the selected item rather than setting the index that might also fix the problem.
    Lloyd Sheen

  • Editing entries in multicolumn listbox

    I am using a multicolumn listbox to display test parameters - ie columns of step number, temperature and time data. I read a previously created test matrix and update the listbox items names using the property node.
    Is it possible to do the reverse - ie edit the item names while the app is running and save a new test matrix from the modified listbox?
    Thanks,
    Niel.

    It seems impossible to edit list in the running time. However, could you try to use string table to do that?

  • How can I justify text in a multicolumn listbox cell dynamically

    I use a multicolumn listbox with two columns to display an event list. Then number of events is different and can exceed the number of displayed rows. I need to justify the text in the first column to right dynamically.
    Is there any way?

    I would split the listbox in two different listboxes, each one with its specific format (make it static).
    Doc-Doc
    http://www.machinevision.ch
    http://visionindustrielle.ch
    Please take time to rate this answer

  • Disable horizontal scroll in multicolumn listbox

    I'm using a Multicolumn listbox and I programmatically change the cell to be edited using UP, DOWN, RIGHT and LEFT keyboard keys.
    Everything is working exept for the rightmost column: when I press the RIGHT key, the cursor moves to the next cell inside the rightmost column but all the table scrolls to the right (even if not really necessary) preventing the user from seeing the first column (leftmost). Is it possible in some way to lock or totally disable the horizontal scroll?
    Every idea would be welcome.

    I don't think there's a way to completely disable scrolling (once you ask the MCLB to show you a cell, it will probably do whatever it can to show it to you), but you can start by making the scrollbar invisible and by setting the Top Left Visible Cell property to [X, 0] every time you move a cell. If this doesn't work, you should upload your code. We play better when we have what to work with.
    Try to take over the world!

  • Multicolumn listbox

    I need an object to store lab-measurements and are wondering, if it’s possible to use a multicolumn listbox.
    My problem is that, I need to know the row number of the active row. By ‘the active row’, I understand the row belonging to the cell activate by user scroll using arrows/ or mouse click.
    Background for my question:
    I want to store the sample number I the first column. The sample numbers are imported from Excel.
    The measurements for the actual sample should come in, in the cells to right in the same row.
    The samples are not always ordered, which means, that I might need to scroll to the correct sample number.
    In order to place the output from the measurement coming from my labView program, I need to know what is the row number of the activate row. But how ?
    Is it possible using multicolumn listbox, or is there another object, which can do the trick?
    In c# it’s possible to do as described using datagridview.
    Solved!
    Go to Solution.
    Attachments:
    example file.jpg ‏19 KB

    I have added some code to your VI.
    The event structure needs to be i a loop, otherwise your program will stop after the first double click
    You need to initialize the array before you start replacing elements, because it is not possible to replace non existing elements
    The Top Left property of the list box can be used to determine the index of the top left visible cell of the list box
    I used now the double click as trigger to change the content of a cell, but you could use a user generated event instead, an fire this event each time a new measurement is available.
    Attachments:
    multicolumn listbox.vi ‏15 KB

  • Read data in the first column selected in a Multicolumn listbox

    When a row is selected in a multicolumn listbox (1 item), how do I go about reading the data in the first column?
    Solved!
    Go to Solution.

    The multicolumn listbox itself is numeric array data type. If you have allowed selection of only 1 item and selection mode of select entire row, it returns the row number. Use the "Item Names" property node to return a 2d array of strings of the items in your box. Index it by the row from the value of the listbox and column 0. See attached code.
    Charles Chickering
    Architecture is art with rules.
    ...and the rules are more like guidelines
    Attachments:
    MultiColumnListbox.vi ‏5 KB

  • How to read which item in a listbox is currently selected?

    Is it possible to read which item in a listbox is currently selected?
    I know how to tell what item in the list was double-clicked. I'd like to be able to click (once) on an item in the listbox and then use buttons on the front panel to affect the item(and list). For example, click on an item in the list and then click an "insert" button to add an item to the list before the selected one.
    I'd like to be able to do this with both regular and multicolumn listboxes.

    The value of the listbox is just a number for which row is currently selected. If you setup your listbox for 0 or more items or 1 or more items, then the value of the listbox is an array of I32 numbers showing which rows are selected. Use a property node to get the Item Names property (an array of the list items) and you can use the value(s) to index into the array. I have included a VI that I use to move items up and down in the list as well as delete items. Feed it the array of item names and the index for the line you want to move/delete. Then take the output and feed it back into a property node of item names.
    I hope this helps.
    Rob
    Attachments:
    Sequence_Element_Move.vi ‏37 KB

  • Using checkboxes to select items in a Spark DataGroup/List?

    I have a DataGroup from Catalyst, laid out like a tile list:
    I'd like to do something a bit different, in that I'd like to allow people to multi-select items in the list using those checkboxes instead of the usual command/control-click.
    The checkbox, label and image are in the itemRenderer.  Is there an easy way that I can have that checkbox toggle the selected state of its list item?

    Hi,
    Using the checkbox as a selection is easy enough as all you have to do is add a change event to the checkbox in the renderer and then in the event
    selected=mycheckbox.selected;
    The fun is how to handle the list click event from the checkbox you can stop propagation but if the item is clicked it will reset the selected indices.
    There is a few ways to handle this
    when processing the list don't use the selected indices just use the checkbox value to determine whats selected
    disable the listbox click event so items have to be selected with the checkbox
    or the most complex lots of overriding so that click acts like a ctrl/click and the checkbox/itemclick can toggle each other.
    David

  • Removing selected items from listbox

    Hi ADF Experts,
    I have a selectmanylistbox with few values displaying in UI and a Remove Button at the bottom.
    User selects certain items from the listbox and clicks on Remove button. The selected items should be reomved. Can anybody suggest how to do this.
    Thanks,
    Animesh

    Duplicate of https://forums.oracle.com/thread/2562542
    User, please don't ask the same question multiple times. If you don't get the answer you want it may be because you did not give the right information and or use case me understand.
    Timo

  • How to read 'clicked header' AND selected row from multicolumn listbox?

    I have a multicolumn listbox filled with 6 columns and about 500 rows.
    I want the user to be able to click on a column header, and sort the listbox alphabetically on that column. I've written the code for that, and that works. (using the 'itemnames' en 'get clicked col hdr' properties.)
    However, I also want to include the option, that when a user highlights a row, and then clicks on the header, that after the listbox gets sorted it scrolls down to the selected row.
    (So that the user doesn't have to search for it)
    And that's where things go wrong, because the value of the listbox changes to zero when you click on a column header. No I idea why it does that, but it's rather
    annoying. Can I change that behaviour somehow?
    Or any ideas how to get around it?

    My thanks to you and Jared.
    Seems I got a working solution now.
    Did take a while to figure out why your solution worked. Basicly, you're reading the row from a few iterations before.
    As soon as I understood that, I simplified it a little. Look at the attached file... I think it does the same. :-)
    Jared asked for the sorting routine. As I don't seem to be able to attach files when replying to comments, I took the liberty to include it here also.
    Basicly, I just use the 'sort 1D array' that comes with Labview 6. To be able to sort a 2D array, I convert every row to a cluster. That's something the 'sort 1D array' VI can handle nicely.
    To sort on the correct column, I just cut all columns in front, and paste them behind again. A
    fter sorting, I reverse the process.
    Anthony.
    Attachments:
    copy2_of_multicolumn.vi ‏26 KB
    sort_2d_string_array.vi ‏34 KB

  • Item on the listbox cant be selected. PLS HELP.

    hello! i am a newbie to ABAP development.
    I followed the listbox steps stated on the RSDEMO_DROPDOWN_LISTBOX because I want to populate my listbox (I created from the screen painter) with the data from a table. It was successful and I can see the data now. Problem is when I am selecting an item of the listbox, it wont be selected. the only thing always selected is the first item on the listbox? what is happening? I do not understand. PLS HELP.
    big thanks.
    TYPE-POOLS: VRM.
    DATA: VALUE TYPE VRM_VALUES WITH HEADER LINE.
    DATA: DD1(20).
    DATA: INT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    SELECT * FROM SPFLI INTO TABLE INT_SPFLI.
    START-OF-SELECTION.
      SET SCREEN 100.
    MODULE PBO OUTPUT.
      LOOP AT INT_SPFLI.
        VALUE-TEXT = INT_SPFLI-CITYFROM.
        APPEND VALUE.
      ENDLOOP.
       CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
              ID     = 'DD1'
              VALUES = VALUE[].
    ENDMODULE.
    MODULE PAI INPUT.
      CASE SY-UCOMM.
        WHEN 'BTNEXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.

    <b>THIS IS A FOLLOW UP QUESTION.</b>
    I have listbox DD1 and I populated that with SPFLI-CITYFROM data. I used SELECT DISTINCT statement so that it will not repeat same entry on my list box. It was successful but then on the 2nd time and on the succeeding times you click on the listbox (trying to select other item), the listbox shows all the city entries from the SPFLI-CITYFROM. The SELECT DISTINCT takes effect only at first because as I have said on the 2nd and succeeding times you click the listbox, it will show you all entries of  SPFLI-CITYFROM. why is that? i dont understand.
    im sorry if i sound so dumb. im a newbie.<b> big thanks to all. </b>
    TYPE-POOLS: VRM.
    DATA: VALUE TYPE VRM_VALUES WITH HEADER LINE.
    DATA: DD1(20).
    DATA: INT_SPFLI TYPE STANDARD TABLE OF SPFLI WITH HEADER LINE.
    SELECT DISTINCT CITYFROM FROM SPFLI INTO CORRESPONDING FIELDS OF TABLE INT_SPFLI.
    START-OF-SELECTION.
      SET SCREEN 100.
    MODULE PBO OUTPUT.
      LOOP AT INT_SPFLI.
        VALUE-KEY = INT_SPFLI-CITYFROM.
        APPEND VALUE.
      ENDLOOP.
       CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
              ID     = 'DD1'
              VALUES = VALUE[].
    ENDMODULE.
    MODULE PAI INPUT.
      CASE SY-UCOMM.
        WHEN 'BTNEXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.

  • Programmatically change selected cell/row of multicolumn listbox

    I want to programmatically change the selected cell of a multicolumn list box whose Selection Mode is set to Highlight Entire Row.  I would use this to be able to highlight which ever row of the listbox I choose to.  It would function in the same manner as if the user had clicked on a row to select it and highlight that particular row.  Setting the Active Cell does not accomplish this.
    Steve
    Solved!
    Go to Solution.

    Assigning the Value property works to change the selected and highlighted row.  Thanks

  • Select item in list box using code

    We use Adobe Workflow v5. I am creating a Check Request application where users type information into various fields and when they click Add, the data is added to a List Box. Also when they click Add, if the current item is >$1,000, a query searches our accounting database to see if the client has outstanding AR older than 90 days. If they do, another list box is displayed with the client name and amount of outstanding AR.
    If that clientnum is already in the second list box, it does not add another one.
    To delete a record from the first list box, the users select the item in the first list box, and then click a Delete button. That deletes the
    record in the first list box.
    I am also trying to delete the record from the second list box but am not sure how to select it using code. As part of the Delete button code, if the currently selected item (the one they want to delete) is >$1,000, I go through each row of the first list box to see if clnum.text (field in the form where the record to be deleted is now displayed) matches the client number in column 4 of any row of the first list box. If it does, I see if the amount of the item in the first list box is >$1000.
    If it is, then I know that there is a corresponding record in the second list box.
    Here is some of the code:
    'go through each row in first list box
    For irow = 1 to lstExp.ListCount
    'set clientnum variable equal to client # in row in first list box
    clientnum = lstExp.RetrieveItem(irow,4)
    'if clientnum variable is equal to client # to be deleted from first list box (selected record - client # in clnum.text now)
    if clientnum = trim(clnum.text) then
    'if amt is >$1,000 in first list box
    if lstExp.RetrieveItem(irow,10) > 1000 then
    'don't delete row because there is another record in first list box
    DeleteOutAR = "N"
    else
    'delete row because there is NOT another record in first list box.
    DeleteOutAR = "Y"
    end if
    end if
    Next
    Here is the code I need help with. I am unsure how to select the record in the second list box so I can delete it.
    if DeleteOutAR = "Y" then
    'go to second list box ?
    form.GoToField(lstOutARUnbilled)
    'start going through second list box looking for clientnum
    For irow2 = 1 to lstOutARUnbilled.ListCount
    if clientnum = lstOutARUnbilled.RetrieveItem(irow2,1) then
    irow2 = lstOutARUnbilled.CurrentSelection
    lstOutARUnbilled.Removeitem (irow2)
    end if
    next
    end if
    So my question is, how can I move to the second list box to actually delete the record?
    Thank you in advance for any help.
    Mary

    Mary-
    The solution could either be quite easy or difficult dependent upon how the data is arranged in the subsequent list box.
    Basically, if there is any sort of corresponding or matching entries, meaning line 1 from list box #1 matches with line 1 of listbox #2, then you would simply execute the following...
    "listbox#2.RemoveItem listbox#1.CurrentSelection"
    Or if you have a column that would contain the same values, say an index, then you could just loop thru the 2nd listbox searching for that index and once found remove the line...
    "listbox#2.RemoveItem nRow"
    , where nRow would be the line that you discovered to have the matching index.

Maybe you are looking for

  • From External Hard Drive to iTunes

    I recently had to reload my computer again, but I did manage to copy my entire My Music Folder and all of its contents. Now I can't get my music back onto my iPod. I keep getting those annoying little "music not found icons." Can someone tell me how

  • What is the model Number for the ipod touch 5g.

    What is the Model Number for the ipod touch 5g?

  • Need help in this one please... java algorithm.

    i have an array of integers, how do i get the unique instances of the integers in that array and save it in another array. i.e. array of integers: parent = {8, 7, 6, 8, 7, 7, 7, 7};result: roots[0] = 8 roots[1] = 7 roots[2] = 6i already finished the

  • How to change transparent PDF background into white background?

    Hi all, I have some text documents in PDF format and would like to edit it in photoshop CS5, but each time I open them up in photoshop, the background seems to be transparent (tiny grey and white tiles), which is very eye tiring when editing/annotati

  • After update to iOS7 my iPhone 5 keeps locking up

    My iPhone 5 keeps locking up after I have updated it with iOS7. I will turn it of by pressing the top button, and then later on when I try to open it nothing happens. I have to plug it in before it will restart itself. Any ideas?????? It's happened a