Disable DataGrid row selection for a column?

Hi,
I have a DataGrid with a CheckBox in one column. When the CheckBox itself is clicked, or any point in the CheckBox column
is clicked, I *don't* want the grid row selected. IOW, row selection should be disabled for the column. How to get this behavior?
Thanks, Garry

Hi All,
I do have almost similar requirement where I have image overlay-ed on row, on whose click a context menu should appear but row should not get selected.
Row selection should happen if user clicks elsewhere on that row (apart from overlayed image).
I tried below lines in MouseClick event listeners.
event.stopImmediatePropagation();
  event.stopPropagation();
Above lines stopped itemClick event but didnt prevent the row selection.
Regards,
Pavan

Similar Messages

  • Disable row selection for certain column in JTable

    I have a JTable with several columns, one of which contains an "Info" button. I already have it worked out that when I click on the "Info" button, that event gets passed from the JTable to the button. I have multi-select enabled for the JTable, but I don't want clicking on the "Info" button to change the current selection. I have a klugy "fix" working where I save off the current selection, and then restore it after the user presses the "Info" button. However, this results in "flashing" - the row containing the selected "Info" button becomes selected briefly, then the original selection is restored. How can I avoid this? I would like to just ignore selection events on the "Info" column, but still pass the mouse click event through to the button.
    Any suggestions?

    try this
            JTable table = new JTable() {
                public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend) {
                    if (!getColumnModel().getColumn(columnIndex).getIdentifier().equals("Info")) {
                        super.changeSelection(rowIndex, columnIndex, toggle, extend);
                    }//else

  • Hide row values for certain column in GRR2

    Hi Experts,
    Looking for some help in report painter. I need to hide row values for certain columns in report painter. The requirement is I have 5 columns in the report, the 5 th column is the sum of col 1 to 4 and in my row i have a formula setup to sum of values for each column, what i would like to do is for column 1 thru 4 i didnt want to display the total values in row total but i wanted to dispaly value for column 5 in row total. I have been trying my best with putting formula, but couldnt succeed.
    Could somebody let me know is there an way to get this addressed.
    Thanks in advance
    Best Regards,
    gj

    How was it achieved ? Did you use sections for the columns for which rows needed to be hidden?
    I have a smiliar issue of hiding certain rows for few columns.

  • Is it possible to disable datatips in columncharts for certain columns?

    Is it possible to disable datatips in columncharts for
    certain columns?

    Hello,
    apologizes for the misunderstanding.
    Regarding security, you might want to have a look at the forum and http://www.sdn.sap.com/irj/sdn/security.
    Back to the original matter, I can tell that modifying or extending the SAP GUI functionality on communication protocol level is quite challenging. The protocol is not published and a binary protocol.
    Depending what your intention is, you might want to have a look at [GuiXT|http://www.guixt.com/].
    Another approach is to write your own controls for SAP GUI, see [How To Extend SAP GUI for Java with Your Own Java Bean |http://www.sdn.sap.com/irj/sdn/sap-gui?rid=/library/uuid/20e0536f-eaf4-2a10-319d-eb68f8e6cee3] on the [SAP GUI family page|http://www.sdn.sap.com/irj/sdn/sap-gui#section16].
    Best regards
    Rolf-Martin

  • Is it possible to enable/disable table row selection?

    I have a situation where a user can add rows to a "selection" table with a value that is used to perform a query to get a collection of objects associated with that value. Once those objects are available, a second "results" table will be populated with the row(s) returned. When the value is entered in the selection table, a web service call is made to perform the query and return the results. This may take a few moments and I am displaying an indeterminate progress indicator for the selection table row involved to indicate that the data is not yet available - the progress indicator is included as a column in the row; each row has its own indicator. Once the results are received the indicator is hidden to indicate the query for that row has completed. The user may enter as many rows in the selection table as they wish so there is a distinct possibility of multiple queries being executed at a given time. I have also attached a row selection listener to the selection table such that when a given row is selected, the results table will display the corresponding associated row(s).
    What I'd like to be able to do is somehow temporarily disable the selection of any row that has a query in progress, while leaving other rows whose queries have completed be selectable. Once the query completes, the row can then become selectable, thus allowing for the results to be loaded and displayed in the results table. The way it works right now, if the row is selected while the query is still in progress, nothing is displayed (obviously), but then the row has to be re-selected after the query has completed to see the results. This is a viable (though undesirable) solution/workaround if there is at least one other row in the table. However, if the row is the only row in the table and has been selected, it cannot be re-selected (there's no other row to select to allow for re-selection). To boil it down, what I'd like to do is prevent the selection of the row until the query for that row is complete.
    After perusing the JavaFX 2.2 API, I'm not seeing any obvious way to achieve this effect. If anyone has any solutions, suggestions, etc. on how this could be done I'd appreciate it greatly.

    Here's an [url https://github.com/james-d/Conditionally-selectable-table]example. As predicted, keyboard navigation fails if the keyboard presses would result in an unselectable item being selected using the default selection model. The best workaround I can see for this is to register event filters for the appropriate keyboard strokes, as in the previously referenced thread.
    Update: That code won't run in the current (ea b90) release of JavaFX 8.0, and probably a few recent releases; it will however run in the final release (and it runs in JDK 7). See [url https://javafx-jira.kenai.com/browse/RT-30593]RT-30593
    Edited by: James_D on May 22, 2013 7:51 PM

  • ALV Row Editable for specific column

    Hi,
      I am creating a transaction using ALV  - Webdynpro. I would like to enable or disable the row ,(specific column in that row ).
    Problem is very similar to the thread posted in the below link.
    enable or disable row in alv
    Please let me know how to achive the scenario.
    Thanks,
    Kumar

    Hi Kumar,
    Have a look at [this thread|How to set some rows in ALV to be editable or some non editable.; in which I have given the complete code to solve your problem. There is one post which explains how to set the cell editor, and one more post explains setting the cell as editable or read only.
    You need to bind the read_only property of your node attribute (i.e, whichever column you want this behavior on), to another attribute (say FLD_READ_ONLY) in the same context node. And based on the value in attribute FLD_READ_ONLY, the cell property would be changed. Define this attribute of type char01. So based on your business logic, if you want the cell to be read only, set X in the attribute, and if you want it to be editable, set space.
    I hope that would be clear enough. Please revert for any clarifications. Depending on your requirement, if you want the read_only property to change on lead selection, you can get the lead selection index and set the attribute FLD_READ_ONLY = X / space only for that element. This would make only one cell editable at a time.
    You could also refer to this recent [thread|ABAP WebDynpro: Can edit a cell in a column?; for the same issue, where you would have some additional pointers.
    Regards,
    Nithya

  • Disable Multiple Row Selection in REUSE_ALV_GRID_DISPLAY

    How can I disable multiple rows from being selected in an ALV grid that is created using REUSE_ALV_GRID_DISPLAY?
    I do not see a selection mode option in the Layout for this Func Mods

    Hi John,
    You can use NO_ROWMARK of layout structrue in REUSE_ALV_GRID_DISPLAY_LVC instead. It's still SLIS type-pools in use, though.
    Check [Vijay's bottom most post|Is it possible to color a text in ALV GRID; how to use this fm.
    Regards
    Marcin
    PS: Sorry I mixed it up. I thought you want to suppress selection at all. For your request therefore SEL_MODE = 'B' of layout strcuture is what you need. Above fm still applies.
    Edited by: Marcin Pciak on Jul 30, 2009 11:16 PM

  • Datagrid row selection Z-index & itemRenderer background

    Hi, I have datagrid with custom item renderers (HBox). Now if
    I change the Hbox bacground color and move the mouse above some row
    in datagrid, actually focused row visualization (azure row) is
    UNDER the itemrenderer background color so I can't see which row is
    actually focused with the mouse. I would like to have this row
    selection above the item renderer.
    Thanks for help.

    Solved. Done through overriding an updateDisplayList function
    in the custom itemRenderer class.

  • Row Selection for second and subsequent level nodes in tree table

    Hi All,
    We have a .jsff page with tree bindings to display a three-level hierarchy tree table.Suppose the hierarchy is
    -> Department
    ->-> Employees
    ->->-> Employee details.
    I have a use case where-in when we add the employee node within a department,the department node must expand and the newly added employee node must be selected.
    In both the cases(for new department or employee), we are following the approach mentioned below:
    1. Get the treeTable Iterator.
    2.Adding the new object to the java ArrayList which is bound to the corresponding level in the tree.
    3.Refreshing the treeTable iterator.
    4.Execute treeTable.setSelectedRowKeys()
    5.Add a partial target to the treetable.
    The issue is that the new employee gets added but the upper-level department node collapses and no selection is performed on the new employee node.
    But when we add a new department node, it gets selected on creation.
    Is there any additional steps to be performed for second-level row selection?

    Hi,
    Thanks for the reply.
    I looked at the code given in sample 61.
    In the sample, a new node is not added dynamically (for ex.either new location or its child nodes.)
    As mentioned in the above post, after adding a new node at a level in our use case, when we perform the refresh of the tree-table's iterator,the selection state of the rows is not shown on the table.
    If the tree-table's iterator is not refreshed and the treeTable.setSelectedRowKeys() is executed, the rows get selected but the subsequent node additions do not show up in the table as the table's iterator is not refreshed.
    Any sample code is available where in both the addition of new node and its selection is performed at the same time?
    Thanks.

  • How to disable first row selection in a table

    Hi,
    I have three tables which have master child relationship. I need to enable a button for each table based on row selection of corresponding table.But first row is being selected automatically and the buttons are enabled.
    what should i do in order to avoid first row selection in a table.I tried by removing selected Row Keys.But still i am getting the same problem.can anyone suggest on this.
    Thank You,
    Sukumar

    I know a hack but I don't recommend it, anyway here it goes:
    Remove selected Row Keys
    Change selectionListener from the default and create a custom action listener (You can call the default one inside of it) (Tip: use makeCurrent function in this PDF
    This will make sure that there is no selected row highlighted for the first time, but it actually means that the first row is selected, it's just not shown.
    This method is tested with 11.1.1.7

  • Disabling multiple row selection in JTable

    hi,
    I have a JTable and I want to disable the multiple row selection.
    I used
    getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);and this working fine with ctr+clicking on a row
    but if i am using shift key instead of Ctrl key multiple selection is possible....
    Any idea y?and how to resolve it??
    thnx
    ~neel

    Use table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);I don't know if it differs but I use it and I don't have the problems you describe. Might be a bug in your Java version?!
    Message was edited by:
    pholthuizen

  • Multiple row select for table not working..

    Hi Experts,
    I have a table in ABAP Web Dynpro where I have enabled the multiple row select functionality. I can select all and deselect all. I can also select a block of adjacent rows of table by choosing first and last by pressing Shift key.
    But I am not able to select multiple individual records for that table.
    I tried the same thing in different system and it works fine there.
    Please let me know if we are missing some standard plugin or we need to enable this in some settings.
    System where the issue is:
    SAP_APPL: release 600, level 18
    SAP_BASIS: Release 700, level 22
    System where it is working fine:
    SAP_APPL: release 604, level 8
    SAP_BASIS: release 701, level 8
    Regards,
    Anand Kolte

    Hi
    Press CTRL key and Select records, you can select multiple records, continuously or randomly your desired selection.
    Cheers,
    Kris.

  • Multiple row selection for table element

    Hi,
    I have a requirement where I require to select multiple rows from a table element in a WD for abap application.
    I have defined a node with cardinality and selection set to 1..n.
    The contex node contains 4 fields : emp_name, pernr, manager and position.
    The attributes of the table element for selectionmode is set to 'multi' and 'selectionchangebehaviour' is set to 'auto'.
    I have defined an action on the 'onleadselection' event.
    The code in this method also includes the statement 'lo_el_team_view->set_selected( EXPORTING flag = abap_true ).' 
    When I execute the application only 1 row is highlighted at any one time when I select it. You can select multiple rows by holding down the 'ctrl' key but I want to avoid having to do this. Is there anything I have missed out causing multiple row selections not to be all highlighted.
    Thanks in advance for any assistance.

    Hi raj,
    you can try the following code in the 'onleadselect' event of the table,
    create one attribute ' Flag'  of type WDY_BOOLEAN under the node which has been binded to the table.
    DATA lo_nd_node_tab1 TYPE REF TO if_wd_context_node.
      DATA lo_el_node_tab1 TYPE REF TO if_wd_context_element.
      DATA  lo_elements TYPE wdr_context_element_set.
      DATA  lo_ele_select_new TYPE REF TO if_wd_context_element.
      DATA lv_deselect TYPE wdy_boolean.
      DATA lv_flag TYPE wdy_boolean.
      DATA lv_select TYPE wdy_boolean.
      DATA lv_index TYPE i VALUE 0.
      lo_nd_node_tab1 = wd_context->get_child_node( name = wd_this->wdctx_node_tab1 ).
    get the current selected element
      lo_ele_select_new = wdevent->get_context_element( name = 'NEW_ROW_ELEMENT' ).
      CHECK lo_ele_select_new IS NOT INITIAL.
    check whether it has been selected or not
      CALL METHOD lo_ele_select_new->is_selected
        RECEIVING
          flag = lv_select.
      lo_ele_select_new->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_deselect ).
    check whether element has been previously selected or not,if not, set the flag to select it
    IF lv_select IS NOT INITIAL AND lv_deselect IS INITIAL.
        lo_ele_select_new->set_attribute( name = 'FLAG' value = 'X' ).
    if selected currently and previously then set the flag as false,in order to delect it
      ELSEIF lv_select IS NOT INITIAL AND lv_deselect IS NOT INITIAL..
        lo_ele_select_new->set_attribute( name = 'FLAG' value = ' ' ).
      ENDIF.
      CALL METHOD lo_nd_node_tab1->get_elements
        RECEIVING
          set = lo_elements.
    according to the falg, select and delect the elements
    LOOP AT lo_elements INTO lo_el_node_tab1.
        lo_el_node_tab1->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_flag ).
        IF lv_flag = 'X'.
          lo_el_node_tab1->set_selected( abap_true ).
          lo_nd_node_tab1->set_lead_selection_index( lv_index ).  * this statement deselects the lead selection index*
        ELSE.
          lo_el_node_tab1->set_selected( abap_false ).
          lo_nd_node_tab1->set_lead_selection_index( lv_index ).
        ENDIF.
      ENDLOOP.
    I hope this resolves your problem.
    Thanks,
    krishna

  • How to disable/enable the cells for editing column wise in JTable in java?

    Hi All,
    Can any one tell me how to disable the cells for editing by column wise in JTable?
    Here depending upon the radio button selected, I need 2 disable some columns for editing
    and enable some columns for editing?
    how can I do tat using JAVA?
    Any sample code is of great help to me.
    Thanks in Advance

    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    ~

  • Drop down selection for a column in Table Control

    Hello,
    I have a table control where data is displayed. The user can fill data in one of the column and save. We want to have a drop down in that column where user can select a value. This column is a qunatity field.
    Please guide how it can be done.
    RR

    In SE51 screen editor, double-click on the editable field and set the dropdown listbox at listbox. As I don't think that you have domain value or table value for this field, set the field value list to "A" from program.
    Then in the PBO use the FM VRM_SET_VALUES to fill the list of allowed values. do this in a module called in the LOOP AT WITH CONTROL which fills the table control from the program data. (use a name like TC_XXXX_CHANGE_FIELD_ATTR)
    I'm not sure SE51 will allow you to use a quantity field in a listbox, so use a character field (check also right justified box on dynpro field attrinutes window), in VRM_SET_VALIUES parameters and in initial filling of the screen field use a WRITE xx UNIT yy to fill the screen field. Then a MOVE should perfect correctly when filling actual database/abap field by a move statement.
    Regards,
    Raymond

Maybe you are looking for

  • : java.lang.Exception in 10 g

    after succsfull installation of oracle 10 g when i connect to consol then thi serror comes plz can nay one help me the error is as error : java.lang.Exception: Exception in sending Request :: null Regards

  • How to avoid the event has been repeated many times in the background

    Application, the main screen is divided into two containers:left and  right container, The right side of the container is divided into two containers:top and  bottom container, There is a button in the left container. Click the button, the container

  • Reporting on direct reports by position.

    I currently run reports on line managers and how many people report to them. I do this by using Ad Hoc Query and choosing HR-OM:PPOME (/SAPQUERY/HE). This gives me a list of staff and their line managers. I then run a quick pivot table to get the amo

  • Safari.  iOS 8  New glitch.

    When I go to this site http://www.rv.net/forum/index.cfm/fuseaction/newest.cfm And reply to a post, the flashing green bar and the spinnng wheel that indicates the Internet connction is in use works as they should. However, they simply never stop.  M

  • Can not get web part to stay minimized

    We have a team site with many web parts on the page many being different calendars. Most the the web part we have set to be minimized. We add a new web part and set it to be minimized by default in the web part settings, as well as clicked the option