Unable to edit cells in JTable on single click of the cell.

Hi,
I am unable to edit a cell in JTable on single click of the cell. If I double click on the cell, I am able to edit it. Please help me.
Thanks
Subbu

Thanks for all replies. Now, i am able to edit the cell on single click.

Similar Messages

  • EPM Formatting Sheet Issue - Right click on the cell and lock the cell

    Dear Experts,
    I have come across an issue. Earlier I worked on BPC NW 10 integrated with Ms Excel 2007. I applied a feature of locking the cell linked with specific member in Input Template and Report by going to EPM Formatting Sheet, selecting dimension member (Which I want to lock in Input Sheet and Report), right clicking on the cell under Data Column and selecting the option "Lock the Cell". As I protect my Input sheet and Report, and do refresh, the cell linked with specific dimension member get locked. Hope everyone has used this feature.
    Now I have Ms Excel 2013 installed in system. I am not able to find this feature. if anyone has tried this feature in BPC NW 10 with Ms Excel 2013. Please help me out. As this was good feature by BPC.
    Regards,
    David

    Hi Andy,
    I am using Excel 2013, When I checked, I did not find "Lock Option". When I was using Excel 2007, then I had this locking option. below are the details that you asked for...
    When I right click on cell in EPM formatting sheet, I get options as shown below in screen shot, but there is no "Lock Option"
    Regards,
    David

  • Rules applied to multiple cells trigger color changes when any of the cells

    "Rules applied to multiple cells trigger color changes when any of the cells meet the rule’s condition." That's what Help says, but when I follow the directions, it doesn't work. This is in Numbers 08.
    I have a table where the contents of one column are either "YES" or "NO", depending on formulas using variables from other cells. If YES, I want the fill of that cell and that of two adjacent cells to change from white to green. I select all three cells and use conditional format rules for "text contains:" YES, then choose my fill color. When I return to the table and introduce values for the variables that trigger the rule, only the cell in the YES/NO column changes to green; the other two remain white.
    While I am spreadsheet challenged, I usually can follow directions as plain as those in Help, but it's not working. I couldn't find anything in the discussions after an hour of searching. Is this a known problem or am I just stupid?

    For what it's worth, that's the way I read that line in the User Guide as well. What it actually appears to mean, though is 'Rules applied to multiple cells apply independently to each of the cells."
    Here's a workaround for your three adjacent columns. Long, but fairly simple steps.
    Add a second table to the sheet (Table 2).
    Resize the second table to one column wide and as many rows as you want to apply the conditional format to.
    Set the width of the column to the same width as the three columns you want to highlight, and the row height(s) to match the rows.
    Format to table to have NO Header or Footer row or column.
    Use the Wrap Inspector to uncheck "Object causes wrap"
    In the first top cell of Table 2, enter an = sign, then Click on Table 1 in the sidebar, Click on the first cell that will hold YES or NO.
    Fill the formula down the rest of Table 2.
    With all cells in Table 2 selected, use the Cell Format inspector to set the 'text contains yes' rule and the conditional fill colour for these cells.
    Test the conditional formating by introducing values into Table 1.
    Click on Table 1 in the sidebar, then use the Table inspector to set Cell Fill to 'none'.
    Click on Table 2 in the sidebar, then drag that table onto table 1 aligning it to cover the cells in which the conditional formating is to appear.
    When positioned (and still selected), go to the Arrange menu and Send Backward to move Table 2 behind the (transparent) cells in Table 1.
    With Table 2 still selected, click on the Cell Borders color well and set the Opacity of the borders to 0%.
    Click the Text inspector and set the Text colour Opacity for Table 2 to 0%.
    Regards,
    Barry

  • Capture single click in a cell in JTable

    I have a Table which has a column that needs to act like a URL link. I.e. when clicked it will bring up a web page. How can I get the mouse event when a specific cell is clicked as well as what cell was clicked?
    The table can not be editable as well as only row selection can be allowed. The user can select rows (not cells), but needs to be able to click a certain column to fire an event?
    Thanks

    To make your table read-only, simply assign it a TableModel which has the method:
    public boolean isCellEditable( int row, int col ){
    return false;
    }To get cell co-ordinates from a mouse click, in your MouseListener class, just do this:
    public void mouseClicked( MouseEvent e ){
    Point p = e.getPoint();
    int row = myJTable.rowAtPoint( p );
    int col = myJTable.columnAtPoint( p );
    }

  • Data is not being displayed into DataGridview until Clicked inside the cells

    Hi,
    On a windows form, I have a DataGridView, its columns are auto-generated every time. Data is loaded after the user click a data-load button. However this is NOT working well, the data is not displayed until manually clicked inside the grid cells. The following
    is the code. Could you please help? Thanks!
     private void ButtonTestGrid_Click(object sender, EventArgs e)
                for (int i = 0; i < 10; i++)
                    this.MainDataGrid.Columns.Add(TestHelper.CreateTextBoxColumn("Col" + i.ToString(), 120));
                Dictionary<string, object>[] data;
                data = TestHelper.CreateTestData();
                this.MainDataGrid.EndEdit();
                TestHelper.LoadGridData(this.MainDataGrid, data);
                this.MainDataGrid.Refresh();
     public class TestHelper
            public static DataGridViewTextBoxColumn CreateTextBoxColumn(string name, int width)
                DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn();
                column.HeaderText = name;
                column.Name = name;
                column.ReadOnly = false;
                column.Width = width;           
                return column;
            public static void LoadGridData(System.Windows.Forms.DataGridView grid, Dictionary<string, object>[] data)
                int index;
                foreach (Dictionary<string, object> row in data)
                    index = grid.Rows.Add();
                    LoadRowData(grid, index, row);            
            public static void LoadRowData(System.Windows.Forms.DataGridView grid, int index, Dictionary<string, object> data)
                string name;
                for (int i = 0; i < grid.Columns.Count; i++)
                    name = grid.Columns[i].Name;
                    if (data.ContainsKey(name))
                        grid.Rows[index].Cells[name].Value = data[name];
            public static Dictionary<string, object>[] CreateTestData()
                Dictionary<string, object>[] dataList = new Dictionary<string, object>[5];
                Dictionary<string, object> data;
                for (int j = 0; j < 5; j++)
                    data = new Dictionary<string, object>();
                    for (int i = 0; i < 10; i++)
                        data.Add("Col" + i.ToString(), i);
                    dataList[j] = data;
                return dataList;

    There are different ways to bind the datagridview control to it's datasource, the question is where and what is your datasource? Is it from a database or XML file, or is it built on runtime...etc? 
    Based on your explanation I can understand that the Datagridview is binding correctly in the code behind since the rows of the grid are created. Because the row of the Datagridview are created only while it is binded correctly to it's datasource. The issue
    of the display seems something different and strange.
    Try also this way by using DataTable one the common ways used:
    static DataTable GetTable()
    // Here we create a DataTable with four columns.
    DataTable table = new DataTable();
    table.Columns.Add("Dosage", typeof(int));
    table.Columns.Add("Drug", typeof(string));
    table.Columns.Add("Patient", typeof(string));
    table.Columns.Add("Date", typeof(DateTime));
    // Here we add five DataRows.
    table.Rows.Add(25, "Indocin", "David", DateTime.Now);
    table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
    table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
    table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
    table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
    return table;
    Then to bind the above Datatable to the grid control:
    this.MainGrid.DataSource = null;//To clear before bind
    this.MainGrid.DataSource = GetTable();
    Fouad Roumieh

  • Single click opn the ALV grid

    Hi all ,
    In the code below ,
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                      RS_SELFIELD TYPE SLIS_SELFIELD.
      DATA: L_TA TYPE SY-TCODE VALUE 'SLIS_DUMMY'.
      CASE R_UCOMM.
        WHEN  'WAHL'.                      "menubutton
          READ TABLE GT_OUTTAB INDEX RS_SELFIELD-TABINDEX. "cursorposit.
          IF SY-SUBRC = 0.
            SUBMIT SLIS_DUMMY WITH P_CARRID EQ GT_OUTTAB-CARRID
                              WITH P_CONNID EQ GT_OUTTAB-CONNID.
          ENDIF.
          CLEAR R_UCOMM.
        WHEN '&IC1'.                       "doubleclick
          READ TABLE GT_OUTTAB INTO GT_OUTTAB INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SUBMIT SLIS_DUMMY WITH P_CARRID EQ GT_OUTTAB-CARRID
                              WITH P_CONNID EQ GT_OUTTAB-CONNID.
          ENDIF.
          CLEAR R_UCOMM.
      ENDCASE.
    ENDFORM.
    this  ( WHEN  'WAHL'.) is for "menubutton click.
    & this ('&IC1'.) is for  "doubleclick.
    Anyone have any idea what should be the return command for single click in grid ?

    Hi Manish,
    here a short examle:
    REPORT ZGRO_TEST MESSAGE-ID ZZ NO STANDARD PAGE HEADING.
    TABLES: VBAK.
    TYPE-POOLS: SLIS.
    INCLUDE <ICON>.
    DATA: PROGNAME   LIKE SY-REPID,
          FIELDCAT   TYPE SLIS_T_FIELDCAT_ALV,
          EVENT_EXIT TYPE SLIS_T_EVENT_EXIT,
          EVENTS     TYPE SLIS_T_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
            VBELN  LIKE VBAK-VBELN,
            KUNNR  LIKE VBAK-KUNNR,
            ICON   LIKE ICONS-L4 VALUE ICON_OKAY,
          END   OF ITAB.
    START-OF-SELECTION.
      SELECT * FROM VBAK UP TO 100 ROWS.
        ITAB-VBELN = VBAK-VBELN.
        ITAB-KUNNR = VBAK-KUNNR.
        APPEND ITAB.
      ENDSELECT.
      PERFORM AUSGABE_ALV_GRID.
    END-OF-SELECTION.
    FORM AUSGABE_ALV_GRID.
      PROGNAME = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = PROGNAME
                I_INTERNAL_TABNAME     = 'ITAB'
                I_CLIENT_NEVER_DISPLAY = 'X'
                I_INCLNAME             = PROGNAME
           CHANGING
                CT_FIELDCAT            = FIELDCAT.
      PERFORM SPALTENEIGENSCHAFTEN USING FIELDCAT.
      DATA:  WA_EVENT_EXIT TYPE SLIS_EVENT_EXIT.
      MOVE:  '&IC1' TO WA_EVENT_EXIT-UCOMM,
              'X'   TO WA_EVENT_EXIT-BEFORE.
      APPEND WA_EVENT_EXIT TO EVENT_EXIT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM      = PROGNAME
                I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
                IT_FIELDCAT             = FIELDCAT
                IT_EVENT_EXIT           = EVENT_EXIT
           TABLES
                T_OUTTAB                = ITAB
           EXCEPTIONS
                PROGRAM_ERROR           = 1
                OTHERS                  = 2.
    ENDFORM.
    FORM SPALTENEIGENSCHAFTEN USING    P_FIELDCAT
                                       TYPE SLIS_T_FIELDCAT_ALV.
      DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      LOOP AT P_FIELDCAT INTO WA_FIELDCAT.
        CASE WA_FIELDCAT-FIELDNAME.
          WHEN 'ICON'.
            MOVE 'X' TO WA_FIELDCAT-HOTSPOT.
            MOVE 'X' TO WA_FIELDCAT-ICON.
        ENDCASE.
        MODIFY P_FIELDCAT INDEX SY-TABIX FROM WA_FIELDCAT .
      ENDLOOP.
    ENDFORM.
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
      READ TABLE ITAB    INDEX RS_SELFIELD-TABINDEX.
      IF  R_UCOMM EQ '&IC1'.
        SET PARAMETER ID 'AUN'   FIELD itab-VBELN.
        CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
      ENDIF.
    ENDFORM.
    Have a nice weekend,
    Regards, Dieter

  • Why does selecting a web link open 2 windows, one with the link and the other the home page? This is a single click of the mouse.

    When I single click on a weblink (usually in an email, Firefox starts up and opens two windows; one with the selected web page and one with my home page. If Firefox is running, it opens a new tab which is what normally occurs. It is only when it is not open that I now get the 2 windows. I have an imac running OSX 10.6.3
    == This happened ==
    Every time Firefox opened
    == In the past couple of weeks.

    Hi,
    The rolling over from radius servers only occurs on the same wlan and only when the controller deems the radius server being dead. However, if you get rejected from one WLAN but then you reassociate to another WLAN there is no mechanism in place in rejecting the attempt because they previously failed on a seperate wlan. This happens all the time with users connecting on incorrect wlans.
    The failover feature is for when you have multiple servers (usually for redundancy) on the same WLAN. So when user is rejected but radius server 1 the process stops there and the request isnt sent to radius server 2.
    Hope that helps!
    Tarik Admani
    *Please rate helpful posts*

  • SharePoint Edit form should pop up when clicked on the hyperlinked itme of a SharePoint list

    I have a SharePoint list where i hae this title column which when clicked brings the display form.
    Can i modify it in such a way that it should pop up the edit form in place of dislay form.
    Thanks

    Open the AllItems.aspx page of that list in SharePoint Designer
    Select a title and right click on it. Format item As -> Hyperlink to -> Edit Form
    This will redirect you to edit form when the title column link is clicked.
    But if you want to show the modal pop up it edit mode, open the Allitems.aspx page in designer
    Select the list view web part, on the ribbon in the List View Tools -> Design tab -> Customize XSLT -> Customize Entire View
    Switch to the code view, search for FORM_DISPLAY and change it to FORM_EDIT.
    jayant prabhakar

  • Jtable in cell how to single mouse click make the cell selected.

    it seems need double click make cell selected.
    thanks!!!

    Hi,
    these link will help you.
    It has code for both examples, with 1 click and with 2 clicks:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=362073&tstart=0&trange=15
    sergio.

  • I am unable to edit PDF file.  I have paid for the Adobe dc program and when I attempt to do this, I am redirected to payment screen.  Would like help?  Adobe takes my money easily, but have no way to contact them except through this setting.  I would li

    I cannot edit a PDF file.  When I try it redirects me to payment screen and I have already paid for this!  I would like to talk to someone per phone.  You have easily taken my money and I would like support.

    "Adobe dc program"???
    Such does not exist; at least not from Adobe.
    As has been asked - What, specifically, was subscribed to? It is identified on the receipt Adobe provides for each subscription account one opens.
    Be well...

  • How to retrieve Data in a JTable, When you click on the specified line?

    I Have a JTable. When I click on a line, I want to retrieve the value of the last column of the selected line.
    I do that:
    int selectedRow = lsm.getMinSelectionIndex();
    int selecRow = lsm.getMaxSelectionIndex();
    String res="";
    if (selectedRow == selecRow)
    System.out.println("number of colomns="+nbCol);
    indiceDoc=(String)(data[selectedRow][1]);
    res = " Row "+selectedRow + " selected"+"Indice =:"+indiceDoc;
    else res = " Rows "+selectedRow + " to "+selecRow + " selected";
    When the table is not sorted, it's ok, but when I sort one or more colomns, it don't return the correct value. It returns the value of an other line.
    "Data" is my original table, but I think that it don't change when sorting.There is the Problem I thinK.
    I think its because the index of the lines is reinitialize after each sorting.
    Do you have an Idea?

    The problem seems to be the sorter. You will have to ask the sorter for the sorted row number.
    I have modified my TableSorter with a new method:
    public int getJTableRowToModelRow(int index) {
         return indexes[index];
    So in my class which holds the tablemodel, table & sorter if I want to get hold of an row I write:
    int selectedRow = table.getSelectedRow();
    int sorterRow = sorter.getJTableRowToModelRow(selectedRow);
    Object data = tableModel.getData(sorterRow);
    tableModel.getData(int row) is an added method to the tablemodel. It only, in your case, returns data[row][1];
    I hope this wasn't to messy for you... ;-)
    //David

  • Unable to add a printer. When I click on the "Add Printer" button, nothing happens.

    I have IE9 on Windows 7 PC.  I have compared my Internet options with another PC and it does not seem to have this issue. Any suggestions?
    NOTE: Please don't suggest changing browsers.  That is a work-around not a solution.
    Thanks

    Hi,
    Clicking the Add a Printer actually not much related with any web browser but more with the operating system functionaity.
    I would suggest you to try updating windows by running Windows Update, reboot the PC and check for any change.
    Also make sure the Print Spooler Service is running:
    Click the Start button and typr run into the search box.
    Open the Run Application within the results.
    Type net start spooler, then click OK
    You should see a black dialog for a single moment.
    Next go to Control Panel > Devices and Printers and try adding a printer again,
    If the option still not function  I would recommend you to contact Microsoft support as the problem relies within the operating system and not within the HP software.
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • HT1711 I have recently upgraded to IOS 7 and now cannot rate my songs in itunes. I single click on the song and hit the applicable dot under ratings which usually then converted to a star. Now it does nothing when I click on the dot. What's wrong?

    Since I upgraded to the latest IOS, I cannot get Itunes to rate my songs. My ratings determine which playlist my songs are entered into. For two days, I've tried to rate the last 4 songs I downloaded but when I click on the songs to bring up the 5 little dots, nothing happens when I click on the applicable dot. Normally I get the stars but not now. Can someone tell me what's going on and what I have to do to make rating a song work?  Thank you!

    Hey briannagrace96,
    Welcome to Apple Support Communities! I'd check out the following article, it looks like it applies to your situation:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/ts1363
    You'll want to go through the following troubleshooting steps, and for more detail on each step follow the link to the article above:
    Try the iPod troubleshooting assistant:
    If you have not already done so, try the steps in the iPod Troubleshooting Assistant (choose your iPod model from the list).
    If the issue remains after following your iPod's troubleshooting assistant, follow the steps below to continue troubleshooting your issue.
    Restart the iPod Service
    Restart the Apple Mobile Device Service
    Empty your Temp directory and restart
    Verify that the Apple Mobile Device USB Driver is installed
    Change your iPod's drive letter
    Remove and reinstall iTunes
    Disable conflicting System Services and Startup Items
    Update, Reconfigure, Disable, or Remove Security Software
    Deleting damaged or incorrect registry keys
    Take care,
    David

  • Re- Single click in the check box ensure to select all check boxes

    Hi All,
    I have an issue to notify the urgency of the cart to the buyer while creating the cart.For that scenario we have a check box in the Basic data of shopping cart.I added the check box in the basic data. Now the  quote check box is available for all the line items.
    The requestor can select any check box in any line items,so whenever he selects the check box- automatically all the check box should get selected , if any of the check box get deselected then imediatelely all the check box in different line items also should get deselected.

    Hi Batchu,
    Thanks for your reply, See if you add any custom field it will come one by one in the basic data section. Adding one more check box doesnot work for this case.
    Moreover the problem is change to any particular line item can be captured in DOC_CHANGE_BADI but i cannot bring the same change to all line items (ie) If 3 rd line item check box is marked then immediately rest of the line item also should get marked.
    In the case of DOC_CHECK_BADI to identify the line on which the change happens is tough.
    SO thats is the problem for me to bring the logic in the code.
    Please if any one come across similar kind of issue please give your suggestion.
    Thanks,
    Sibi

  • Re: Unable to see Table statistics on when I click on the Table

    I have lost the ability to see table statistics when I click on the table. I use to be able to click on the table name under the connection window and would get a display of The columns, data, constraints, index,dependencies etc..... Now It does not seem to work any more I tried preferences but I don't seem to be able to change the behavior back to the way it was any suggestions.

    I upgraded to 1.2 and it solved the problem. I would however love to know the settings that control this display.

Maybe you are looking for