How to select the row on right click.

Hi,
I want row selection when user right click on the table.
Right now when user right click on table a pop up menu comes but no row selected at this time.
Can any body tell how select the row when right click over the table.

Hi,
look at this thread:
http://forum.java.sun.com/thread.jspa?threadID=501957&messageID=2374481
L.P.

Similar Messages

  • Urgent :  how to select the rows in the ALV Grid Control

    How to select the rows in the ALV Grid control,
    I am facing the situation where i need to select the row/rows in the Grid control and then to lock the entries,
    If anyone have the solution please help me out
    <b>Its very Urgent</b>

    Hi Bharath,
    Go through this hope u can understand.
    SEL_MODE. Selection mode, determines how rows can be selected. Can have the following values:
    A Multiple columns, multiple rows with selection buttons.
    B Simple selection, listbox, Single row/column
    C Multiple rows without buttons
    D Multiple rows with buttons and select all ICON
    Setting and getting selected rows (Columns) and read line contents
    You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
    Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
    Data declaration:
    DATA:
    Internal table for indexes of selected rows
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    Example 1: Reading index of selected row(s) and using it to read the grid table
      CALL METHOD go_grid->get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines = 0.
        CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
             EXPORTING
                  textline1 = 'You must choose a valid line'.
        EXIT.
      ENDIF.
      LOOP AT gi_index_rows INTO g_selected_row.
         READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
        ENDIF.
      ENDLOOP.
    Example 2: Set selected row(s).
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines > 0.
        CALL METHOD go_grid->set_selected_rows
            exporting
              it_index_rows = gi_index_rows.
      ENDIF.
    Reward points if helpful.
    Thanks
    Naveen khan

  • How to get the link when right-clicked (for extension development)?

    Hi,
    I want to get the link when I right-click it in a page.
    I explain: when you right-click a link, you get "Open link in a new window"; this menuitem sends the link to the js function to perform an action and that's exactly what I an looking for
    Thank you

    Hi,
    If you have than one table with add_row_button then this code will work fine
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    tableBean is Handle for your advanced table, hope it will help.
    Regards,
    Reetesh Sharma

  • How to forbid the use of right click to open a pop up window  from a link ?

    I would like to prevent the user from opening pop up windows using the right button of the mouse on a link.
    Is it possible ?
    Thank you in advance for any help and suggestion.
    Paolo

    Is this regarding OAF ? if this is a requirement in OAF, then its not possible(unless you put in some javascript function in the page).
    If you want to do it in other jsps there are a lot of examples available in google on how to do this.
    Thanks
    Tapash

  • How do I delete a song from my Itunes library? I follow the instructions and right click on the song and click delete from the drop down menu but, then it asks me if I am sure I want to hide this song in Iclouds? I dont even know what Iclouds is?!?! HELP!

    How do I delete a song from my Itunes music library? I follow the instructions and right click on the song and then select "delete" as specified and my info claims at that point it will ask if I want to send this song to my trash bin, but, instead, when I try to delete the song, I get another window asking "are you sure you want to hide this song in iCloud? I don't even know what iCloud is?!?!? I don't want iCloud and just want to get rid of old songs!!! HELP ME!!!

    Short answer:
    Click Hide Song(s), it is what you wanted to do...
    Long answer:
    iTunes in the Cloud is a feature of your iTunes store account that allows you to redownload or stream your past purchases. When you delete a purchased track that is downloaded to your computer (like the first one shown here) you are asked if you also want to hide the song from iCloud. This would remove it from the computer and also stop it showing up with the iCloud symbol as the other tracks from that album (which are not downloaded) do.
    If a track shows with the cloud symbol you can play (stream) it by double-clicking the title, or click the cloud symbol to download a local copy to your library. If you try to delete one of these tracks you get a slightly different message confirming that you want to hide the track. Clicking hide will remove the listing from the library and any other device that shows your past purchases.
    Should you want to retrieve any item hidden in this way at a later date use Store > View My Account > iTunes in the Cloud > Hidden Purchases > Manage.
    To hide all your previous purchases that are not downloaded to your computer use Edit > Preferences > Store and untick Show iTunes in the Cloud purchases.
    tt2

  • Unable to select an image with right click of the mouse

    When in Library mode using grid view, right clicking on a thumbnail does not select the thumbnail, and previously selected items remain selected. If you then try to delete the item, you can inadvertently delete multiple items that you did not intend to delete and not the item you wanted to delete.
    Right clicking on an already selected image or one of a group of selected images works and all selected images can be deleted. However a right click on a non selected image should should drop any current selections and select only the image clicked. (This can be verified in Bridge)
    I am using Lightroom 1.3.1 in Windows XP SP2 with 2 gig of ram.

    Have you switched your mouse buttons i.e have you changed assignments to your mouse buttons in the control panel?
    If not, then clicking on an image will select it, CTRL-Click will select non-contiguous images, SHIFT-Click will select contiguous images.
    Right-clicking will show a context menu. (and the context menu will change if you have single multiple images selected: e.g if you select two images you will see a menu item Open in Compare that is not there if only a single image is selected, Delete Photo... becomes Delete Photos... etc)
    Also, in grid or filmstrip view you will see up to three levels of brightness on the frames around thumbnails:
    -lightest frame: the active image i.e. the one that will be opened if you go to develop mode, or will be used as "source" for synchronize command etc
    -medium: other images that you have selected.
    -darkest: images that are not selected.
    Selected images will also have a white frame immediately around the thumbnail.

  • How can I select the row after a cfgrid refresh?

    I have a form that is bound to a cfgrid.  The grid is populated from a database.  When you navigate in the grid the data displayed in the form changes to match the selected row.  I can edit the data in the form and update the database.  After updating the data I refresh the cfgrid, which then displays the updated data.
    Unfortunately the cfgrid always highlights the first row, row 0, after a refresh.  I want to highlight the same row that was highlighted when the data was edited and saved.  Can anyone advise as to how I can do that?
    I have tried setting a listener when the grid is initiated that responds whenever the store is refreshed and triggers the function refreshSelection():
    g.getStore().on('load', refreshSelection) ;
    Before the form data is saved, the row number is stored in selectedRow[0].  When the grid is refreshed, refreshSelection is run:
    function refreshSelection() {
    if (0 >= selectedRecords.length)
         return;
    alert('Selected row is Row ' + selectedRecords[0] ) ;
    g.getSelectionModel().selectRow(selectedRecords[0]) ;
    selectedRecords[0] = 0 ;
    The alert shows the correct row number each time, but highlighting the last row viewed works intermittently, and only if the alert line is active.  If I comment out the alert, this fails every time, with row 0 being highlighted.  selectedRecords[0] is reset to 0 after the attempt to select the row so that navigation through the grid, such as choosing "Next Page," will properly highlight the first row of the page rather than the last row number that was edited.
    -Rick

    Massage?
    Why not ask the masseuse who gave you the massage?

  • How to select a row in datagrid by checking the check box in that row

    how to select a row in datagrid by checking the check box in that row.
    Im using <html:checkbox> tag, and also a VO which is in request scope. i wanna display the values in the VO in a row and corresponding to this i want a checkbox..
    Thanx in advance
    Message was edited by: me
    Hemanth@SA
    Message was edited by:
    Hemanth@SA

    Hello,
    I got the solution:
    final int pRow = row;
    final int pCol = column;
    final JTable myTable = mytable;
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    myTable.requestFocusInWindow();
    myTable.changeSelection(pRow, pCol, true, true);

  • How do I disable those pesky "hover-over" pop ups? I tried the method of right clicking on them and opting out, but it doesn't work. If you guys could add some kind of blocker to your browser, it would be a huge plus!

    # Question
    How do I disable those pesky "hover-over" pop ups? I tried the method of right clicking on them and opting out, but it doesn't work. If you guys could add some kind of blocker to your browser, it would be a huge plus!

    Chris CA wrote:
    Did you createa smart playlist? It's purple with a gear icon.
    And you set the criteria to
    Match rule:
    Date added is in the last two weeks?
    I tried it, but couldn't get it to work. I think I had trouble with the Rule. I put a Rule in as follows: Data added in the last five hours? I added music (data) but nothing appeared in my Smart Playlist. Oh yes - I named the playlist: Recently Added.
    What did I do wrong? Is it necessary to have a question mark at the end of the Rule? I couldn't find anything on how to create a Smart Playlist in Help. There is stuff in there, but it does not go into much detail, i.e., nothing on the proper wording of the Rule.

  • How to obtain the row data in the component datatable?

    if I want to edit a row data, and then know which row is edited in the component datatable, and how to do?
    How to obtain the row data in the component datatable, and update it to database, not simplely edit a simple table
    Any ideas? Thanks

    Thank you very much for your help Alexander !
    It's quite confusing when you leave Struts and try to adapt your projects for JSF for the first time...
    I wanted to click on a row with a "onMouseClick" on the TR tag like I used to do in Struts/JSTL. But it seems to be impossible in a dataTable.
    Ok then. I've added a column at the end of the row with an icon.
    But eventually I didn't need to declare link parameters.
    In my BackingBean I did like this :
    public String selectEventForUpdate() throws IllegalAccessException, InvocationTargetException {
            PortletAgenda event = (PortletAgenda) JSFUtils.getInRequestMap("event");
            BeanUtils.copyProperties(this, event);
            return null;
       }JSFUtils.getInRequestMap(...) is a method I wrote in a util object :
    public static Object getInRequestMap(String name) {
            Object res = null;
            Map requestMap=FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
            if (requestMap!=null) {
                res=requestMap.get(name);
            return res;
    }  " event " is the name of the item in my dataTable list.
    My backingBean has the same attributes as "event".
    So when the page is reloaded I have a backingBean full with the selected properties to edit/update.
    Thanks to your reply I realized that putting this form in the middle of the dataTable seems to be impossible.
    So I put this form in a floating DIV in front of the table with a shadow.
    It works :o) !
    But I'm a little bit disapointed to be honest...
    I used to build my web applications with Struts and JSTL and doing this kind of interface was really easy.
    I've decided 3 days ago to convert into JSF because the "GUI Layer" seemed to be improved.
    But now I realize that I cannot put a onMouseOver and onMouseClick on a row and I cannot display a different row in the middle of a table....
    I think it's a shame because there is a facet for header and footer.
    And it would be great if we could create our own personal facet that appears only if a condition is true.
    For exemple " if the current item id is the same as the request parameter id then display the following facet content ....... (with a panel group and a form inside to update the row) "
    It's easy to do that with JSTL thanks to c:forEach and c:if but it seems to be impossible to use JSTL tags like this during the dataTable iteration.
    And JSF tags seems to have no logical tags like " if " or loops that can be nested in dataTable.
    I really need to realize this interface (you click on a row then an edit form appears where you clicked).
    Do I have to write a component myself that extends dataTable?
    Do you know if writing such a component is hard to do for a beginner like me?
    (I've juste discovered JSF 3 days ago and I've used Struts/JSTL for 2 years til now)
    I'd be glad to have much advices from you about that.
    Regards

  • How to select a row dynamically in a TreeTable?

    I am trying to select a row in a treeTable when the user right clinks on a row. how I do this? I tried giving the following. I don't see visually that the row is selected. What I try to achieve this?
    ....me.getX() here "me" is the MouseEvent. I see the selRow has the right value too but can' tsee it visually the selected row.
    int selRow = treeTableData.rowAtPoint(new Point(me.getX(),me.getY()));
    treeTableData.setRowSelectionInterval(selRow,selRow);
    treeTableData.repaint();
    treeTableData.updateUI();
    component = me.getComponent();
    popEditor.show(me.getComponent(), me.getX(), me.getY());

    use
    setRowSelectionInterval(int fromRowIndex, int toRowIndex);example if your table has 10 rows then u want to select the rows from 4 to 8 then use
    setRowSelectionInterval(3, 7);if you want to select just one row for example 5 then use
    setRowSelectionInterval(5, 5);

  • How to highlight the row from the JTable then remove

    hi !!
    i'm using an abstract model in making a table....
    and having a button up and down and delete also!!
    how can i highlight the row when i click down and up!!!
    and when selected or highlighted i can press the button delete ...
    then the data is removed!!!
    pls... i need it!!
    tnx...

    Table row selection should take care of it. By default table rows can be selected.
    The getSelectionModel() method on the JTable gives you access to the row selection model. You can set that either to allow one at a time or multiple selection, and when your delete button is pressed, you access that selection model to decide which rows to delete.
    Add a ListSelectionListener so you can enable or disable your delete button as rows are selected or deselected. JTable will take care of the highlighting.

  • How to select the download location? its automatically downloading to users folder in c drive. i wanna change it..plz help me out......

    how to select the download location? its automatically downloading to users folder in c drive.. i wanna change to my desktop...plz help me out...

    Tools -> Options -> Save files to -> Click browse button and browse for folder where you want to save the file.

  • How to select multiple row in ALV report

    Hi friends,
    1. How to select multiple row in ALV report
                   ( How to set tab in ALV report and want to select multiple line.)
    Thanking you.
    Subash

    Hi Sahoo,
    If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
    in layout structure you will find field SEL_MODE
    pass :
    LS_LAYOUT-SEL_MODE = 'A'.
    In PAI.
      CALL METHOD GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = T_ROWS
          ET_ROW_NO     = T_ROWID.
    Hope these will solve your problem.
    Regards,
    Kumar M.

  • How to increase the row height of the table in the smartform

    Hi,
    Can any one say,
    How to increase the row height of the table in the smartform.
    It is presently show the row width very small, i want to increase the row with of the table in the smartform.
    Plase say how can we increase the row height in the smartform.

    Hi Ravi,
         In Smartforms , Select the Table and you can adjust the cell hieghts in OUTPUT OPTIONs TAB.
        Reward points if that Helps.
    Manish

Maybe you are looking for

  • Error in SOAP Sender Adpater

    hi I am SOAP to RFC scenario.. when i am testingthe WSDl from Altova it giving me the follwing error com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageExpiredException: Mess

  • G4 and cs3 upgrade woes

    Does anyone have any suggestions how i might get the cs3 upgrade loaded onto an older g4. it does not have a dvd drive, so i was wondering if there is a way to use our server at work to load it to my machine? i assume we could buy a cheap dvd player

  • Use of Oracle Triggers as Deltamechanism for Custom Tables

    Hi Colleagues, we have a 50 million records Y-Table in SAP ECC 6.0 with Oracle 10.2.0.2.0. The Y-Table have no update, timestamp or numeric pointer fields for using the SAP generic delta feature. So we will use the Oracle trigger feature: CREATE TRIG

  • DBIF_REPO_SQL_ERROR with archive write program FI_DOCUMNT_WRI

    Hello community, we have a problem with the archive write program FI_DOCUMNT_WRI, it generates DBIF_REPO_SQL_ERROR on the table REPOSRC. We get a lot of dumps DBIF_REPO_SQL_ERROR, SQL-Error -913, ERROR: UNSUCCESSFUL EXECUTION CAUSED BY DEADLOCK OR TI

  • Voucher not found in local voucher store.

    I am testing Flash Access 2.0. I have some error ouccured the falsh player masage is Starts to get video metadata at Mon Oct 25 18:04:44 GMT+0900 2010 DRMContentData received on Mon Oct 25 18:04:44 GMT+0900 2010 authenticationMethod = anonymous Serve