How to get the selected rows in a table

Hi,
How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
Thanks

Please search the forum before posting questions.
refer following thread for table selection.
Re: Record selection with MessageCheckBox and print the selected record.
--Prasanna                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to get the selected rows & columns in the table?

    hi everybody,
                         In my application the table is kept inside the event structure.I select the cells  in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?

    Hello,
    You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings.  I think for your "disable" question you are referring to the shortcut menu (when you right click).  If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Check box als column in a standard table, how to get the selected row

    Dear experts,
    I habe standard tablt with check box as column. Now I want to get the current selected row structure and do some changes. How could I solve this problem? till now I just know to get the structure via lead selection.
    lo_node->get_element().
    lo_element = lo_node->get_static_attributes ( static_attributes = ls_row).
    How could I get the element through check-box in stead of lead selection. Many thanks!

    check this code
    To get the selected row number
    data: lr_element type ref to if_wd_context_element,
              lv_index type i.
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lr_element->get_index( ).
    Thanks
    Bala Duvvuri

  • V v urgent ...  how to get the selected rows in the vl02n transaction

    Hi ,
    I have requirement that i have selected the line items in the vl02n transaction.
    If I select only one row there is option gs_get_cursor-line.
    If I select more than one line item at a time I am getting only the last value in to gs_get_cursor-line.
    Can anybody let me know how to get the multiple line items  that are selected
    It is very urgent ..
    Plz Help

    Hi,
    can you check the E_row_id .
    v_row type LVC_S_ROW
    read table itab index E_ROW-index.
    regards,
    Ajay
    Edited by: Ajay on Feb 14, 2008 6:22 PM

  • [UIX-ADF] How to get the selected row in my ViewObjImpl.java

    Hi,
    I have a uix table with a select column. I dragged my method from my ViewObjImpl
    and dropped it on the select column (radiobutton) as a submitbutton.
    If I run my application and select a row and press my button it always reads the first
    row. Why?
    I also tried including a param in my method, for the record id, but I dont know what to
    pass to my action binding as a param, where can I find the selected row?
    This is what I want, my method in ViewObjImpl.java
    public void doDelete() {
      ViewObjRowImpl pRow = (ViewObjRowImpl)this.getCurrentRow();
      try {
        pRow.setIsDeleted("Y");
        //this.executeQuery();
        this.getDBTransaction().commitAndSaveChangeSet();
        //this.validate();
      } catch(Exception e) { System.out.println("ERROR doDelete" + e);  }
    }It should set the IsDeleted field to 'Y' for the selected row. Perhaps im not doing the
    right thing for this?
    Can anyone give me some pointers?
    Thanks in advance
    Ido

    Thanks. So even if you select a row and then press the button, your method still only finds the first row?!
    Are you sure that the selection mechanism of your table is working? Your tableSelection fires a select event and your page contains a select handler?
    When you wire your page using drag and drop the binding should always use the default iterator of the ViewObject. And getCurrentRow() should always give you the current row of that iterator. So my feeling is that the selection doesn't take place.
    Or could it be that something resets the currency in the ViewObject from another place?
    Sascha

  • How to save the  selected rows from Advance table into database

    Hi
    I have requirement like..
    In custom page , Manager Search the Candidates and selects the candidate ROWS from advance table.
    The reqt is how to save the selected multiple rows into the database.

    hi Reetesh,
    In Custom page
    Supoose the Recruiter Search is for Position Finance Mangager , it retrieves 100 rows , out of which Recruiter select 10 rows .
    So in Such scenario how to save this 10 rows against Recruiter
    , i mean , Is i need to create custom table, to save Recruiter , these selected 10 rows.
    I hope u understand my question

  • How to populate the selected row details of table in the next view?

    hi,
    Im having a table, on selecting a particular row of a table by clicking on a radio button. i need that row details to be passed on(populated) to the next view when i navigate to that view by clicking on a button?
    Thanks & Regards,
    Suresh

    Hi Suresh,
    Your scenario is simple. Just follow the ex as shown below
    (Assuming you want default selection view provided by table itself.)
    1>Create 2 views (Ex:A and B)
    2>Create a Context with a node and attributes(For Ex:Person as node and Fname and Last Name as attributes
    2>In A view create a table with F name and L Name(map to context as well) and a action button to navigate to B view when you selected a particualr row o.k
    3>In B view, create a TextView with mapping to LastName(or all the data if you want from input selection) from the context
    If you want you can add back action button from B view to A view for easy navigation.
    4>Execute the application and select any row in the table appeared, press next action button,you can see that the selected row details will be shown in second(B) view.
    If you do the above example, I think you can easily find the solution for navigation issue.. try it out.
    In case if you are not able to ...let me know..I have that example.
    Hope that helps
    Regards
    Praveen

  • How to move the selected rows from a  table control in dialog programming

    hiiiiiiii Every1
    I have to update some fields for a slected row in table control on click of a button and save it in database.
    Regards
    Sachin Dhingra

    see below example, I have added INSERT option after DELETE option, you can use same table or you can use differnt table by populating into that table and insert into the db table. If you want to use same internal table then use below code
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    insert into table from itab.
    ENDLOOP.
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA cols LIKE LINE OF flights-cols.
    DATA: ok_code TYPE sy-ucomm,
    save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
    TABLES demo_conn.
    SELECT * FROM spfli INTO TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
    cols-screen-input = '0'.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE cancel INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
    MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
    save_ok = ok_code.
    CLEAR ok_code.
    CASE save_ok.
    WHEN 'TOGGLE'.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
    IF cols-screen-input = '0'.
    cols-screen-input = '1'.
    ELSEIF cols-screen-input = '1'.
    cols-screen-input = '0'.
    ENDIF.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    WHEN 'SORT_UP'.
    READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
    IF sy-subrc = 0.
    SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
    cols-selected = ' '.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDIF.
    WHEN 'SORT_DOWN'.
    READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
    IF sy-subrc = 0.
    SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
    cols-selected = ' '.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDIF.
    WHEN 'DELETE'.
    READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
    IF sy-subrc = 0.
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    DELETE itab.
    ENDLOOP.
    ENDIF.
    WHEN 'INSERT'.
    READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
    IF sy-subrc = 0.
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    itab1 = itab.
    modify itab1.
    ENDLOOP.
    ENDIF.
    if not itab1 is initial.
    INSERT dbtab FROM TABLE itab1.
    endif.
    ENDCASE.
    ENDMODULE.

  • How to get the selected cell in a Matrix.

    Hi all,
    Does any one know how to get the selected cell in a Matrix. Please help to answer. Thanks in advance.
    Regards,
    Thanh Tran

    Hi,
    You can get the value of every cell  using UI API but using datasources is a better aproach.
    Using UI API you need to know the event you want to catch. Example: Catching click event in itemcode column and getting the value (C#):Ki
          if ((pVal.EventType == BoEventTypes.et_CLICK) &&  //CLICK EVENT
              (pVal.ItemUID == "38")  &&                                       //MATRIX-> ITEM 38
              (pVal.ColUID == "1") &&                                           //ITEMCODE COLUMN
              (!pVal.InnerEvent) &&                                
              (!pVal.BeforeAction))
                    Form form = null;
                    try
                        form = kernel.Application.Forms.Item(pVal.FormUID);
                        form.Freeze(true);
                        Matrix mtx = (form.Items.Item(pVal.ItemUID).Specific as Matrix);  //MATRIX OBJECT
                        string itemCode = (mtx.Columns.Item("1").Cells.Item(pVal.Row).Specific as EditText).Value.Trim();  //itemcode = VALUE OF CELL. COLUMN "1": ITEMCODE COLUMN. CURRENT ROW: pVal.Row
                    catch (Exception ex)
                        kernel.Application.MessageBox("Error " + ex.Message, 0, "", "", "");
                    finally
                         if (form != null)
                            form.Freeze(false);
    Kind regards,
    Nauzet Díaz

  • Getting the Selected Row from a JTable

    hi,
    how Can i get the Selected row from a JTable
    thanks...

    You know that JTable class? Well, you see those methods in it called "getSelectedRow()" and "getSelectedRows()"...?

  • How to get the selected values from the shuttle

    Hi
    Please tell me how to get the selected option values from the shuttle leading list.
    Thanks

    you can also obtain the option values present in the leading and trailing lists using the
    following methods:
    public String[] getLeadingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)
    public String[] getTrailingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)For example, the following code sample returns an array of values in the trailing list, ordered according to the
    order in which they appear in the list:
    String[] trailingItems =
    shuttle.getTrailingListOptionValues(pageContext, shuttle);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to delete the selected rows in a JTable on pressing a button?

    How to delete the selected rows in a JTable on pressing a button?

    You are right. I did the same.
    Following is the code where some of them might find it useful in future.
    jTable1.selectAll();
    int[] array = jTable1.getSelectedRows();
    for(int i=array.length-1;i>=0;i--)
    DefaultTableModel model = (DefaultTableModel)jTable1.getModel();
    model.removeRow(i);
    }

  • How to get the selected value in SelectOneMenu in backing bean

    Hello all,
    I need your help. I want to have 2 select menus with the second menu's items list are populated based on the selection in the first menu. I don't know how to get the selected value in the backing bean so that I can based on that select menu to populate the second menu's item list. Basically I need to access to the UI Component of the first select Menu and retrieve its selected value.
    Could you help me out?
    Thank you very much in advance,
    Lngo

    Hi Lingo,
    There r two ways of getting the values into the list. First one is hardcoding the values and the second one is use the list and get the values into the list by firing a query in the database.
    Inorder to display the values in the second menu based on the first onces selection we need to add an attribute to the first selectonemenu known as valueChangeListener and we need to sumit the page.
    Here is the sample code
    <h:selectOneMenu id="catalogue"
                                  binding="#{urbean.catalogue}" onchange="submit()"
                                  valueChangeListener="#{urbean.categoryValueChange}"
                                  <f:selectItem itemLabel="Select Catalogue" itemValue="" />
                                  <f:selectItems value="#{urbean.catalogueList}" />
    </h:selectOneMenu>
    <h:selectOneMenu id="category"
                                  binding="#{urbean.category}">     <f:selectItem itemLabel="Select Category" itemValue="" />
                                  <f:selectItems value="#{urbean.categoryList}" />
                                  <                         </h:selectOneMenu>
    now in method called by valuechangelistener we need to write the similar code
    public void categoryValueChange(ValueChangeEvent event) {
    String rfnum = (String) event.getNewValue();
    List categoryList = new ArrayList();
    List tempList = new TablenameDAO().getActiveCatByCatalogueID(rfnum);
              for (int i = 0; i < tempList.size(); i++) {
                   Tablename tablename = (Tablename ) tempList.get(i);
                   String value = "" + tablename .getrfnum();
    String label = tablename .getname();
         if (label == null) {
                   label = "";
                   SelectItem item = new SelectItem(value, label);
                   categoryList.add(item);
              bean.setCategoryList(categoryList);
    ///getActiveCatByCatalogueID (rfnum) should bring the records which r based on the rfnum
    if u follow this process i am damsure that u will get the values in to the secondlist based upon the first list
    Thanks & Regards
    Manidhar

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • How to identify the Selected row number or Index in the growing Table

    Hi,
    How to find the selected Row number or Row Index of growing  Table using Javascript or Formcalc in Interactive Adobe forms
    Thanks & Regards
    Srikanth

    After using bellow script it works fine
    xfa.resolveNode("Formname.Table1.Row1["this.parent.index"].fieldname").rawValue;

Maybe you are looking for

  • How to create a template and child pages using mockup designed in Fireworks

    I have created a website in Fireworks, and exported it to use in Dreamweaver.  How do I use the Master page in Fireworks as my template page in Dreamweaver?  When I bring in the .htm files from fireworks, it tries to bring in the entire page.  I have

  • Transfer data on a flash drive from XP to Windows 8.1 PC not working

    When i download a novel from my old XP to a flash drive stick it will enter the new Windows 8.1 pc and show in downloads but will not open.  Why?

  • Suddenly cannot print to Canon wireless printer

    I'm on an iMac with Yosemite 10.10.3 and also have two Macbooks on the same network. We have been using a Canon MG6620 wireless printer for several months without a hitch. Suddenly, between documents, the printer and computers stopped talking to each

  • Downloading and Installing iTunes on Win 8.1 Pro

    I have downloaded iTunes on my new PC that has the Win 8.1 Pro OS. When the download finished and iTunes opened up for the first time I got an error message that said 'iTunes has detected a problem with your audio configuration. Audio/Video playback

  • P2 1080i/24p and CS3

    Started a DVCPRO HD 1080i/24p project. Imported P2 mxf files shot in 1080i/24p. Timeline needs rendering when mxf is placed on timeline. Why does this happen? Every other native P2 project for DVCPRO HD does not require rendering. ex, 720/60 etc. CS4