Unable to edit a Table Cell. Help required.

Hello Folks,
Please I need some help.
I have a java class which allows a user to enter and delete
data into a table dynamically.
So the user can enter any number of rows and once he clicks on the
concerned row, he can also delete that row.
I just have one small problem.
I am unable to 'edit the cell'. i click on.
can any one please help me on this. I'd like to send this class
file.
Can any one please send in their email address so I can attach this file
Please some one respond.

Hv u used something like this. What table model u r using. I hv used DefaultTableModel.
c this piece of code: This might help.
tblView = new JTable(model)
               public boolean isCellEditable(int r,int c)
                    try
                         if(r == 0)
                              return true;
                         else
                              return false;
                    catch(Exception e)
                         apilError.createErrorLog(e,"Error1 class Bank_Reconciliation.java, in Constructor line no 194");
                         CallErrorMessage(apilError.systemerror,2,"Error");
                    return false;
               public static final int a1=0;
               public static final int a2=1;

Similar Messages

  • Editable Dynamic Table  Cells

    Hi to all,
    I am using studio creator and mysql.
    I created a Dynamic table for Emp Names and Emp Skills, in that table for Emp Skills i put Text Feild.I am getting text feild in my table.
    here is my doubt
    I am trying to implement the functionality of editing table cells when clicked/doubleclicked on it. I am trying to make the cells editable(textboxes) only after clicking/double clicking them. It should display static text otherwise.
    I am trying to do this one in Javascript onClick event.
    Any sample code I can refer to.Any help is highly appreciated.
    help me
    jo

    Hi friend,
    Thanks for your kind reply.
    what you have send is useful for static table, in static table we can bind any row.
    But in my Module i am using Dynamic table, in that dynamic table for all the rows i need TextFeild.
    when we open the page it has to show static text for all the cells and when we are clicking particular cell that Text feild has to open.
    I dont no how to get Induival id for each and every cell, then only we can bind in dynamic table.
    Any suggestions are welcome.
    Jo

  • How do I edit a table cell value in the same view?

    This is probably just a clarification more than a question, but when looking at the iPhone->Settings->Mail,Contacts,Calenders view. If you select a mail account, you are taken to the account edit view where you can edit your account information.
    In this particular example, there is a 4 row grouped table section, with headers like "Name", "Address", "Password" and "Description".
    I am trying to duplicate this method of data entry where I don't have the user select the cell and get navigated to a new screen, but rather just pop up the appropriate keyboard, and allow them to edit within the cells within the same view.
    Currently, the only implementation that seems to make sense is to add a UITextField to the cell, and when the user selects, it will allow them to duplicate this behavior. It seems like there's an easier way to do this, but just not finding it.
    it seems like SetEditing deals more with deleting, adding and reordering...not actually editing data within the cells.
    Anyways, if there are any tips/tutorials/etc to look at, much appreciated!

    i do that. but the new window doesnt open a folder in the same path location 

  • Robohelp HTML 9 hyperlinks in table cells help

    Hi,
    I'm creating a table in robohelp html 9 and adding hyperlinks in the table cells. If the hyperlink is the first word in that cell robohelp is adding styling code to the link eg <td><a href="#" style="color: #0000ff; text-decoration: underline; ">test</a></td>.
    If I add a link to the second word in a table cell the styling does not appear or even if I add a space before the link the code does not appear eg <td>&#160;<a href="#">test</a> </td>.
    The code appears when I flick between design and HTML views but it does not make any difference in which view I create the link.
    No matter how many times I delete this code is keeps coming back. Can  anyone please help me? Is there some default that gives this the styling  code?Does anyone else get this issue?
    A table with the different examples is below. It was created in design view by clicking table>insert table>OK. Links added by clicking the insert hyperlink button.
    <table style="border-collapse: separate; border-collapse: separate;" cellspacing="0"
             width="33.333%" border="1">
        <col style="width: 100%;" />
        <tr>
            <td><a href="#" style="color: #0000ff; text-decoration: underline; ">test
             that has the added code</a></td>
        </tr>
        <tr>
            <td>&#160;<a href="#">test with space in front of link</a> </td>
        </tr>
        <tr>
            <td><a href="#" style="color: #0000ff; text-decoration: underline; ">test</a></td>
        </tr>
        <tr>
            <td>A <a href="#">test</a> </td>
        </tr>
    </table>
    Thanks in advanced

    I have the same problem with those stupid links in tables - I've been working on this for HOURS and HOURS...... Based on previous experience, I assumed it must only be me and an ill-formed stylesheet. The table/link issue just came to my attention because I am in the process of changing styles/formats to a new company standard (new link color) and thought I really screwed my CSS up as I was changing things!
    My only workaround thusfar has been to rewrite some data in the tables so that text will precede the link (yes, I did).  And where I just couldn't do that, I resigned myself to the problem and forced a different color on the links (changing the #0000ff).  One plus was that RH didn't rewrite the color code once it was changed manually..... but then I realized later that I didn't consider the hover color when I did this, so I now have to go back and correct them. 
    So glad to find your post...........
    I played with the idea of adding hidden text, but was worried that the problem was really a result of an issue with my CSS and doing that wasn't the proper way to fix it.   So, without guilt, I took Rick's suggestion and added an invisible dot/period at the beginning of every link in a table, when that link is the first or only content in the td.  Did the trick!  Now the links assume my declared css style! 
    I submitted a bug report.......
    Thank you!!!

  • Unable to edit song info, any help?

    for some reason, i am unable to edit song info in itunes 10.6.3, MAC OS X 10.7.4
    did just set up an apple tv unit. related?

    See this -> Windows XP: To set, view, change, or remove file and folder permissions

  • SOLVED: Editing a table cell won't update corresponding ViewObject

    Hi,
    I'm asking for your help.
    I want to update a ViewObject with userinput from jTableCells. The JTable that has been constructed by JDev based on this ViewObject. The attributes of this ViewObject are the result of a SQL query using the NVL() function.
    The Problem is that changing cell values does not update the ViewObject. I guess NVL() causes this. Right?
    As a solution I'd like to add a TableModelListener to the table and take care that changes to cell-data find their way into the right ViewObject attribute. Is this the right solution?
    How can I add a working TableModelListener?
    My try:
    jTable1.getModel().addTableModelListener(new MyTableModelListener());
    The TableModelEvent, that MyTableModelListener gets, always returns "-1" for getColumn(). Why?
    Is there another way to get the current row and column (where the cell-edit takes place)?
    I hardly know anything about ADF, panelbindings and so on, so don't back off with answers that my appear too simple or obvious to you.
    Regards, MaeSiuS
    Message was edited by:
    MaeSiuS

    Hi Frank,
    yes, it is based on EntityObjects.
    For a test, I replaced one of the NVL() based attributes with the plain attribute of the EntityObject, but that had no effect on the update disability.

  • Stop editing a table cell

    Hi,
    I want to edit a cell of a table, so I have this:
    public class AttributeFrameCellEditor
         extends DefaultCellEditor
         public AttributeFrameCellEditor (final JTextField tf, final String aoName, final String attName)
              super (tf);
              delegate = new EditorDelegate()
                   public void setValue (Object param)
    // manipulate data in an internal frameEverything's fine, but how can I tell (Whom?) sth like editingStopped?
    Now I have to select another row to get rid of the Textfield.
    Looking forward to your help!

    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Problem with constraint in a table..help required..

    Hi ,
    i need to create a table which has an attribute year_joined and need to set a constraint that the year_joined should be less than or equal to the current year (year obtained from sysdate (YYYY)) ..
    can any one help me with the create statement required...
    eg: create table test(year_joined number, constraint c_year check(year_joined< = ?));
    i could not use a sub query in the create statement.
    help req..
    thanks,
    sri

    Satyaki,
    I tried but fail. Could you please tell the way how it can be implementaed in CHECK constraint.
    SQL> CREATE TABLE T ( YERR_JOINED NUMBER(4) , CHECK (YERR_JOINED <='2007'));
    Table created.
    SQL> drop table t;
    Table dropped.
    SQL> CREATE TABLE T ( YERR_JOINED NUMBER(4) , CHECK (YERR_JOINED <= TO_CHAR(SYSDATE,'YYYY')));
    CREATE TABLE T ( YERR_JOINED NUMBER(4) , CHECK (YERR_JOINED <= TO_CHAR(SYSDATE,'YYYY')))
    ERROR at line 1:
    ORA-02436: date or system variable wrongly specified in CHECK constraint
    SQL>

  • Internal table logic - help required

    Hi,
    I am working on BSEG table to determine offsetting line count and amount total for a posting line item and need
    a small logic .
    I have a table of currency fields like below and the table is such ( like BSEG ) that each line item will balance
    itself with other line item . For example
    Item
    10      100
    20      100-
    30      200
    40      250
    50      450-
    60      200-
    70      200
    80      600
    90      100
    100     200
    110     300
    If you see 10 & 20 balance out similarly ( 30,40 will balance with line item 50 ) , ( 60 & 70 balance each other ) ,
    ( 90,100, 110 balance with 80 ).
    My requirement - If I loop on item 50 with amount 450- I need to get the posnr of the two items which balance
    this amount ( which is 30 and 40 ).  If I loop on item 80 with amount 600 then I need to get item 90. 100 and 110.
    Please provide me a logic which will provide me the index of ther required item lines.
    Regards
    Praneeth

    Hi, execute this code.. might be helpful to you
    TYPES: BEGIN OF test,
             a TYPE i,
             b TYPE i,
           END OF test.
    DATA: itab TYPE TABLE OF test,
           wa  TYPE test,
           wa1 TYPE test,
           c   TYPE i,
           d   TYPE i,
           n1  TYPE i,
           n2  TYPE i.
    PARAMETERS :  p TYPE i.
    wa-a = 1.
    wa-b = 20.
    APPEND wa TO itab.
    wa-a = 2.
    wa-b = 30.
    APPEND wa TO itab.
    wa-a = 3.
    wa-b = 10.
    APPEND wa TO itab.
    wa-a = 4.
    wa-b = 10.
    APPEND wa TO itab.
    wa-a = 5.
    wa-b = 20.
    APPEND wa TO itab.
    READ TABLE itab INTO wa WITH KEY a = p.
    c = wa-b.
    LOOP AT itab INTO wa WHERE a GT p.
       n1 = wa-a.
       IF c EQ wa-b.
         EXIT.
       ENDIF.
       LOOP AT itab INTO wa1 WHERE a GT wa-a.
         IF wa-a = wa1-a.
           EXIT.
         ENDIF.
         n2 = wa1-a.
         d  = wa-b + wa1-b.
         IF c EQ d.
           EXIT.
         ENDIF.
       ENDLOOP.
       IF wa-a = wa1-a.
         EXIT.
       ELSEIF c EQ d.
         EXIT.
       ELSE.
         CLEAR: n1, n2.
       ENDIF.
    ENDLOOP.
    WRITE: n1 , n2.

  • CL_GUI_ALV_TREE - Possible to edit the table cells in situ?

    Hi
    I am working on my first CL_GUI_ALV_TREE report.  The hierarchy is in place and the fields come through ok on the table side.  However,  I would now like to edit the fields.  I have the checkbox showing in the tree control and the row is set to editable.  Am I able to edit the fields in the table side in situ, as I would do in the CL_GUI_ALV_GRID control i.e. using mc_style_enabled/disabled?  These attributes are not present in the class builder so I presume not.  Is there another way? 
    Cheers
    Ian

    Hi
    module user_command_0100 input.
      DATA return TYPE REF TO cl_gui_event.
      save_ok = ok_code.
      case ok_code.
        when 'EXIT' or 'BACK' or 'CANC'.
        Exit program
          leave to screen 0.
      Process ALVtree user actions     
        when others.
          call method cl_gui_cfw=>get_current_event_object
                  receiving
                     event_object = return.
          call method cl_gui_cfw=>dispatch.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    check this code and call method cl_gui_cfw
    hope this helps u....
    Reward points if useful...
    Regards
    Sreenivas

  • Table Maintanance Help Required-urgent

    Hi All,
    I generating table maintanance generator for the table zuser_Secobjects. In this table GUID is a primary key and APPLN,APPLN_TYPE,PARTNER_TYPE are the non primary keys.  I am using two screens method here. on both screens i am not showing GUID ( i am hiding this field in screen1 and screen 2) whenvere new record is created for every record guid is going to create. now my reuirement when i click on position(pushbutton) name in screen 1 it has to show APPLN,APPLN_TYPE,PARTNER_TYPE where as these 4 fields are non primary keys . i am getting uniqire record using guid. so i am keeping guid as primary key.i can't keep these 4 fields as primary keys in the table zuser_secobjects.
    anybody can faced this kind of problem if so please let me know whow to approach in this case.
    thanks,
    maheedhar.t

    Hai Maheedhar,
    I have also faced the related problem.
    <b>Please refer the below links.</b>
    <b>It will helps you a lot.</b>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
    Table Maintenance generator is required to do Manual entries in the Table. If the requirement is to update the table only programmatically and not manually then table maint. generator is not required.
    Manual entries in table can be maintained ( New record can be inserted / existing can be modified ) using transaction SM 30, if the table maintenance for the table is generated.
    <b>Don'forget to activate it.</b>
    How to activate Table maint.
    Goto SE11 and open the table.
    Click UTILITIES -> Table Maint. Generator, Enter the details and click on Save. Then activate the table.
    <b>Please refer the below links.</b>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

  • Internal Table Operation Help Required

    Hi
    I have to insert 8 counters p1-p8 in a field BANFN of ITAB1.
    Like this their are 3 more fileds.I have to show the no. for PR released frm JAN-DEC in ALV format.I had doen the calualation,but unable to insert these conters in ITAB1 to do final calculation & display the result.
    Please help me.
    I had used : insert p1 into itab1-banfn where sy-index 1.
    Like this I had tried out many comands,but al in vain.PLZ help me in this regard.
    Regards.
    Vipin

    There are 8 fileds in my internal table,in which 1st one is for MONTH(JAN-DEC).
    The ALV is only suppose to display 12 rows,containing each month per row.
    Now for each month I have to display the PR converted to PO & the avg lead time for each month.So I had calu all the data ,but now I have to insert 12 counters in 4 fields.one for No of PR converted to PO in each month,than one for AVG LEAD TIME for each month.so there has to be 12 + 12 counters for each row.Similar operation I have to perform for the PR pending fo PO.So there has to be 24 more counters for again 2 diff fileds.Now I had calcuated the data,but the problem is this ,,,,,how to insert each ctr in each row.
    EG: insert ctr1 into itab1-banfn where itab1-mmyy = 'January' or sy-index = 1.
          insert ctr2 into itab1-banfn where itab1-mmyy = 'Febuary' or sy-index = 2.
          move crt1 to itab1-banfn where sy-index = 1.
    None of the operation is working.
    Like this i have to insert 48 counters in all rows for these 4 diff fileds.
    Pl help me in thsi regard ,if possible.
    regards.

  • Table view help required

    hi,
    I've a htmlb tableview which gets the data from an internal table which is a data member of a model. I've two column fields in this view which are editable. What are the steps I need to follow in order to get the internal table updated with the values provided by the user in the editable fields of tableview.
    could someone please provide me with the steps as to how to achieve this?
    Thanks and Regards,
    Vamshi

    Hi Vamshi,
    Try this  sample code,as it helps you considerably.
    local types
    types: itabtype type TABLE OF STD1.
    types: begin of message_struct,
    type type char10,
    text type char100,
    end of message_struct.
    page attributes
    addtab TYPE ITABTYPE
    addtab_row TYPE STD1
    add_flag TYPE FLAG
    deltab TYPE ITABTYE
    deltab_row TYPE STD1
    ITAB TYPE ITABTYPE
    iterator TYPE REF TO IF_HTMLB_TABLEVIEW_ITERATOR
    message TYPE MESSAGE_STRUCT
    STUDENT TYPE STRING
    STATUS TYPE STRING
    <b>layout</b>
    <htmlb:content design="design2003" >
      <htmlb:page title="test1" >
       <htmlb:form>
    <htmlb:tableView id              = "tv1"
                               visibleRowCount = "20"
                               onRowSelection  = "MyEventRowSelection"
                               selectionMode   = "lineEdit"
                               table           = "<%= ITAB %>"
                               iterator        = "<%=iterator %>" />
                  <htmlb:button id      = "save"
                                text    = "Save Changes"
                                onClick = "myEvent" />
    eventhandler OnCreate
    this handler is called once the page is first created (stateful mode)
    it performs a once-off data initialization or object creation
    SELECT * FROM STD1
                INTO CORRESPONDING FIELDS OF TABLE itab.
    CREATE OBJECT iterator TYPE  STD1ITERATOR.
    eventhandler OnInputProcessing
    event handler for checking and processing user input and
    for defining navigation
    DATA: ITAB_WA type Line of  itabtype.
    DATA: event TYPE REF TO cl_htmlb_event.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    FIELD-SYMBOLS: <row> type STD1.
    DATA: tv TYPE REF TO cl_htmlb_tableview.
    tv ?= cl_htmlb_manager=>get_data(
                            request      = runtime->server->request
                            name         = 'tableView'
                            id           = 'tv1' ).
    IF tv IS NOT INITIAL.
      DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
      tv_data = tv->data.
      IF tv_data->prevselectedrowindex IS NOT INITIAL.
       FIELD-SYMBOLS: <row> type LINE OF ITABTYPE .
        READ TABLE ITAB INDEX tv_data->prevselectedrowindex
        ASSIGNING <row>.
        DATA value TYPE string.
      if <row> is assigned.
        value = tv_data->get_cell_id( row_index    =
                     tv_data->prevselectedrowindex
                                       column_index = '1' ).
         DATA: inputfield TYPE REF TO cl_htmlb_inputfield.
        inputfield ?= cl_htmlb_manager=>get_data(
                                request      = request
                                name         = 'inputfield'
                                id           = value ).
        <row>-STUDENT = inputfield->value.
        value = tv_data->get_cell_id( row_index    =
                     tv_data->prevselectedrowindex
                                       column_index = '2' ).
        inputfield ?= cl_htmlb_manager=>get_data(
                                request      = request
                                name         = 'inputfield'
                                id           = value ).
        <row>-STATUS = inputfield->value.
    ENDIF.
    ENDIF.
    WHEN 'add'.
        tv ?= cl_htmlb_manager=>get_data(
                                  request      = runtime->server->request
                                  name         = 'tableView'
                                  id           = 'tv1' ).
        IF tv IS NOT INITIAL.
          tv_data = tv->data.
          IF tv_data->prevselectedrowindex IS NOT INITIAL.
            READ TABLE itab INDEX tv_data->prevselectedrowindex
             ASSIGNING <row>.
          endif.
        endif.
    WHEN 'add'.
        add_flag = 'Y'.
      WHEN 'add_save'.
    ITAB_WA-STATUS = request->get_form_field( 'STUDENT' ).
    ITAB_WA-STATUS = request->get_form_field( 'STATUS' ).
    endcase.

  • Pop up text area in a JTable cell help required...

    I want help in following concept.
    One of the columns in a JTable should be pop up. If I can click that column in any row, the cell data should open a pop up and display the cell data fully. It is possible in JTable.
    Please guide me on this...

    Hi,
    I have found the solution for this.
    I added the following code snippet in my table and it worked.
    table.addMouseListener(new MouseAdapter() {
                   public void mouseClicked(MouseEvent e) {
                   if (e.getClickCount() == 1) {
                             JTable target = (JTable) e.getSource();
                             int row = target.getSelectedRow();
                             int column = target.getSelectedColumn();
                   JTextArea ta = new JTextArea();
                   int constant = 200;
                   int constant1 = 300;
    ta.setSize(constant, constant1);
                   ta.setEditable(false);
                   String text = (String) table.getModel().getValueAt(row, column);
                   ta.setText(text);
                   ta.setLineWrap(true);
                   JScrollPane sp = new JScrollPane(ta);
                   sp.setSize(constant, constant1);
                   sp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
                   JOptionPane.showMessageDialog(table,sp);               
              });

  • Unable to edit music on iTunes, help please.

    I am having problems editing tracks. I use either iTunes, or Tag & Rename to edit tracks. I had no problems at all in XP doing this. but, I have moved to Vista and now the track if I try and edit it, it's "greyed" out. I cannot edit it with eithger program.
    I moved my old iTunes onto my External HD and moved the HD to my laptop.  I then copied the iTunes folder over to Music on the laptop, and it found the HD no problem, copied over playlists, and counts. It syncs without a problem and continues the counts.

    It is a bit of a downgrade not being able to edit music details on the phone, but the only solution I've found is to make sure it's right before I drag and drop it onto the phone, then the issue becomes somewhat irrellivant ?
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

Maybe you are looking for

  • How to find out with my application is using any timezone dependable data

    hi guys, i am going through the notes: Updating the RDBMS DST version in 11g R2 ID 977512.1 Bum into this part where it mention: Oracle cannot say to what DST version you need to use, this simply depends on if you are using DST information or not in

  • Redirecting between a desktop-browser site and a mobile site

    My company is inheriting a site built by another party in CQ5. This site is intended to be viewed on a desktop browser. We are tasked with building a mobile site for it. Our creative department would like the user's browser to be detected, and if the

  • ITouch 2G bluetooth help

    I have an iPod Touch 2nd Generation with firmware 3.0. I have tried to use my bluetooth headphones (Philips SHB6100), without success. I have paired the two devices together but I can't find an option to enable the use of them. There is no icon next

  • Upgrade CRM 5.0 to CRM 7.0  with MS SQL 2005

    Hi, I am stuck with this error while working on an upgrade of CRM system. Any help is highly appreciated. Please let me know if you require more information. 4 ETW000 H:\usr\sap\C7D\upg\abap\exe\R3trans.exe version 6.14 (release 701 - 05.03.09 - 08:2

  • Command line in Unix

    Post Author: mcarver1 CA Forum: General Does anyone know of a way to invoke crystal reports in Unix from a command line.  I need to be able to run and export to a PDF file.  Thanks !