Auto numbering in an editable table cell

I created a dynamic table with add/delete row buttons and the second column with text fields.  The text field I want it to initially say <enter task 1> and <enter task 2> and when the user clicks on the add row button it would then say <enter task 3>.  I tried the patterns display but not sure how to get it to do auto numbering.  I also tried the formcalc script $ = Concat ("<Task", $.parent.index + 1, ">").  This seemed to work with the auto numbering but then I couldn't actually edit the boxes.  Any help on this would be greatly appreciated...thank you.

Did you make the field as ReadOnly or Protected?
Also make sure where did you place your code? If it is in the Calculate event, the default is "Calculated - ReadOnly".
Placing the code in Initialize event might help.
Thanks
Srini

Similar Messages

  • Theme Editor: where to change backgroundcolor of editable table cells?

    Hi all,
    I need to change the color of an editable table cell.
    I navigated to the theme editor --> tables.There is a section "Editable Tables". The preview shows an example with three columns and tree rows. I want to change the backgroundcolor of the cell in the first row, third column (in SAP standard it is lightgrey).
    The backgroundcolor of the rows beneath can be changed in section "Selected Cells", the backgroundcolor of the first two columns in the first row can be changed by "Background Color of Standard Table Cell" but I can't find the field where I can change the color of the last cell.
    Best regards,
    Sandra

    Hi,
    The blue color come from your definitions on "Labels and Fields" to read-only color of input field.
    Regards,
    F.F

  • Edit table cells

    i have edited the setValueAt method of the TableModel interface to enable editing of cells in my JTable - in-situ. This works fine. However, i would like it so that when any change is made to the table data, it is automatically sorted depending on how it was sorted before the change was made. i have:
    public void setValueAt(Object aValue, int row, int col) {
            if (col == 0) {
                bookList[row].setBookNumber(Integer.parseInt((String)aValue)); // Populates cell with new book number
                if (lastSort == "number") {
                    listByNumber();
            } else {
                if (col == 1) {
                    bookList[row].setTitle((String)aValue); // Populates cell with new book title
                } else {
                    if (col == 2) {
                        bookList[row].setAuthorPrename((String)aValue); // Populates cell with new author prename
                    } else {
                        bookList[row].setAuthorSurname((String)aValue); // Populates cell with new author surname
        }i would put more if statements in later for different sort methods but at the moment ill just stick with one. My problem is that the array is being sorted correctly, but the table doesn't update automatically to show the change. what DOES happen - is when you click on each row of the table, it changes until it is in the correct order. this leads me to think that the sorting works fine, but somehow my table model isnt reflecting the changes? can any help me update the table in real time?

    no luck :( i tried:
       public void setValueAt(Object aValue, int row, int col) {
            if (col == 0) {
                bookList[row].setBookNumber(Integer.parseInt((String)aValue)); // Populates cell with new book number  
                listByNumber();
                fireTableDataChanged();and extended AstractTableModel but it still didnt work. is there anything else i would need to do?

  • Select text of edited table cell

    Hello,
    I would like to have the text selected of a table cell i am editing. When i double click the cell, i can change the content of the cell, but i should manually select the text first.
    I would like to have this text selected automatically.
    Thank you in advance,
    Rene Boere

    Add a focus listener on the text field you are using in the cell editor. When the text field gets focus, tell it to select all of it's text. Something like this maybe:final JTextField tField = new JTextField();
    tField.addFocusListener( new FocusListener() {
        public void focusGained( FocusEvent fe ) {
            tField.selectAll();
        public void focusLost( FocusEvent fe ) {

  • Edit table cells in Dreamweaver 8

    In Dreamwever MX2004 if you have a 1 row, 2 column table, I
    can enter text in the left cell and not affect the right cell,
    otherwords, I can have text in the right cell and it does not move
    if I do a carrage return in the left cell.
    However in Dreamweaver 8 with the same situation, the text
    line in the right cell moves down one line for each carrage return
    in the left cell. Dreamweaver 8 does not leave an editable area
    abovr the text of the right cell so you can't backspace the text
    back to the top of the cell, thus, I can't have any alignment
    between the two cells.
    Any ideas on how to make Dreamweaver 8 behave the same as
    Dreamweaver MX2004
    Cheers,
    Linus Sagadore

    as a pure guess, it's got to do with the align attribute of
    the td tag, or
    the css being used.
    my guess is the code is set to vertically align the contents
    of the right
    cell. When you add content to the left cell, the right cell
    gets taller, so
    the contents of it appear to move down.
    if you're still unclear- please make a page with each
    version, with a table
    that does this, and upload someplace and give a link to the
    uploaded pages.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • May I create  a  editable table cell in web dynpro java?

    Hi erveryone:
    i can see the readonly property of table in studio,but i can't input data after deployed view to the portal,can i create table include editable cell?
    best regard
    reefish

    Hi,
    When u create the table, choose apply template option>choose table>select the context node to be bound. In the Table Binding Wizard, choose the editor as Input Field.
    Regards,
    Rachel

  • Editing table cell data can be difficult

    There are times I click and click on a cell to get it to edit.  Is there any trick to making the cells more editable?  There are times I have to click 10 times to get the cell to edit.
    Matt
    Message Edited by mfitzsimons on 06-01-2006 12:28 PM
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
    Attachments:
    profilesUpdateAll.vi ‏22 KB

    Hi matt,
    for me it works just fine (using LV 8.0.1). Maybe it's because you only have to click once (no dbl-click) and wait a bit, then it changes to editable. On Dbl-click, nothin happens.
    be cool.
    dave
    Greets, Dave

  • Editing table cells

    Hi! Does anyone know a good guide or a good tutorial to undestand the setting up of the tableCells of a tableView? How to work with them at all, chaning colors, adding different size and color text, images or similar?
    Thank you

    What types of edits are you doing? and what is the source of the table (or its original formatting)?

  • Table cell editing

    how to edit table cells ? i am trying it since 2 days. with different errors. it's throwing some null pointer exception.
      public TableView getTableview() {
             TableView<Contact> fx2TableView = new TableView<Contact>();
             public  TableColumn<String> firstNameCol = new TableColumn<String>("First Name");
            fx2TableView.setLayoutX(260);
            fx2TableView.setLayoutY(20);
            fx2TableView.setOnMouseClicked(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent event) {
                       if(event.getClickCount()==2) {
                       System.out.println(fx2TableView.getEditingCell().getRow());
            AccountDb myTableData = new AccountDb();
            ObservableList<Contact> teamMembers = FXCollections.observableArrayList(myTableData.mymain());
            fx2TableView.getItems().clear();
            fx2TableView.setItems(teamMembers);
            firstNameCol.setDataRetriever(new Callback<CellDataFeatures<String>, String>() {
                public String call(CellDataFeatures<String> c) {
                    return ((Contact) c.getValue()).getFirstName();
            TableColumn middleNameCol = new TableColumn("Middle Name");
            middleNameCol.setDataRetriever(new Callback<CellDataFeatures<String>, String>() {
                public String call(CellDataFeatures<String> c) {
                    return ((Contact) c.getValue()).getMiddleName();
            TableColumn<String> lastNameCol = new TableColumn<String>("Last Name");
            lastNameCol.setDataRetriever(new Callback<CellDataFeatures<String>, String>() {
                public String call(CellDataFeatures<String> p) {
                    return ((Contact) p.getValue()).getLastName();
            fx2TableView.getColumns().addAll(firstNameCol, middleNameCol, lastNameCol);
            return fx2TableView;
        }now i can see the data from table . how to edit it . i tried few statements to print a particular cell data.
    by using
      System.out.println(fx2TableView.getEditingCell().getRow()); or
                      fx2TableView.edit(fx2TableView.getColumns(fx2TableView.getEditingCell()));
                   System.out.println(fx2TableView.getRowFactory().call(CellDataFeatures<String> c) {
                    ((Contact)c.getValue()).getFirstName()));
                 fx2TableView.getOnEditStart(new EventHandler<EditEvent>()) {
                  public void handle(EditEvent e) {
                    }); what to write ? i am totally lost . any example how to edit , save and cancel on tableview edit ?
    Thanks.
    Edited by: 809387 on Jun 9, 2011 9:49 AM

    Hello User you can easily modify your Table Cell . In context of your code I've made one sample editing cell for your 'first column'.
    firstNameCol.setCellFactory(new Callback<TableColumn<String>,TableCell<String>>(){
                public TableCell<String> call(TableColumn<String> param) {
                    final StackPane stack = new StackPane();               
                    final Label label = new Label("test");
                    final TextBox box = new TextBox("test");              
                    box.setVisible(false);
                    //adding children to stack z-index
                    stack.getChildren().add(label);
                    stack.getChildren().add(box);
                    final TableCell cell = new TableCell();
                    cell.setNode(stack);
                    //event listener for textbox
                    box.setOnKeyPressed(new EventHandler<KeyEvent>(){
                        public void handle(KeyEvent event) {
                            if(event.getCode()==(KeyCode.ENTER)){                           
                                box.setVisible(false);
                                label.setText(box.getText());                           
                                box.setFocusTraversable(false);
                    //property Change Listener of Focus in textbox               
                    box.focusedProperty().addListener(new ChangeListener<Boolean>(){
                        public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
                            if(!newValue){           
                                box.setVisible(false);
                                label.setText(box.getRawText());
                    //finally trigerring the visibility of textbox on double click
                    cell.setOnMouseClicked(new EventHandler<MouseEvent>(){
                        public void handle(MouseEvent event) {                      
                            if(event.getClickCount()==2)
                                box.setVisible(true);                       
                                box.requestFocus();
                    return cell;
            });The above code runs the editing textbox when tablecell is double clicked.
    You can manage the item of TableCell and make tablecell setNode() for more modification.
    Please read the API for more information.
    Thanks.
    Narayan

  • JavaFX2.2 TableView:How to make a table cell be edited without mouse click?

    Hi,
    I've encounter a problem with editable table cells. I'm using the TableView in my project just as the Tutorial on Oracle (http://docs.oracle.com/javafx/2/ui_controls/table-view.htm).
    According to it, I use the setCellFactory method to reimplement the table cell as a text field with the help of the TextFieldTableCell class. However, I found the steps is a little complex to get to the point where the cell can be edited:
    1.Let the table cell be selected by using direction key.
    2.Press “Enter” to converts the cell to a text filed so that it is ready to be edited.
    3.Clicking in the text field allows the contents to be edited
    The problem is step 3, that you must use the mouse to click before you can input data in this table cell.
    So, is there a solution to avoid step 3? That is the text field allows the data inputting when you just press “Enter”(step 2).
    By the way, English is not my native language. Hope I have made myself clear.

    Hi,
    You need to pass the focus to the text field when the startEditing event occurs. In the class that extends TableCell you use for cellFactory:
    public void startEdit() {
    super.startEdit();
    createTextField();
    setText(null);
    setGraphic(textField);
    * put focus on the textfield so user can directly typed on it
    Runnable r = new Runnable() {
    @Override
    public void run() {
    getGraphic().requestFocus();
    Platform.runLater(r);
    }

  • 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

  • Auto-numbering in Tables - any new suggestions?

    I have a table in Pages and I need each row to have a stand-alone number in the first column — simple numbering 1, 2, 3.
    If I use the numbered list feature, all the rows are #1.
    I have read as many other threads about numbering tables as I could  find and tried the =ROW() formula, but it numbers the header row so my  first row of data is 1.2. Also it doesn’t auto-number new rows -- you  have to paste in the formula in every new row, and that still doesn't  solve the issue of numbering the header row.
    I tried the auto-fill drag feature (selecting the cells and dragging the corner), but once the cells are numbered, they do not update when the row order changes, and new rows have no numbering. The table is very long and having to update the numbering using the drag feature has become frustrating and cumbersome.
    I need my first row of data to be 1 and my second row to be 2 and so on — sounds simple right?
    Any suggestions other than the ones above?
    Thanks in advance,
    Katz
    p.s., Numbers has the exact same issues and also doesn’t auto number when rows are moved or added, so it doesn't help to work in Numbers and copy ithe spreadsheet over as a table.

    In Numbers, or Pages:
    If your first row of data is row 2 and you want it to be numbered "1" then you use the formula "=ROW() - 1" (without the quotes) in the first column and fill it down in all the cells of the column.
    If all the rows in the table except header and footer rows have that formula in them, Numbers will include the formula when you add new rows. If you rearrange the rows by cutting and pasting, or by dragging a row to somewhere else, of course, it takes the formula with it leaving a blank cell behind. (So don't do that; just move the part of the row from column "B" on.).

  • Auto-numbering of item field in custom table for EEW enhancements for BUPA

    Hi Experts,
    We have a requirement to generat 3 custom tables in EEWB,for BUPA and assigned it to BP_HEAD. I have done all the generations and it works fine, the problem  is that the tables that are generated is not allowing us to have a data(material) of 0...n cardinality. 
    The table that we are aiming is to allow multiple records, so my solution is to have an extra item number field so that it will allow multiple records for a material. But users are requesting to have the item number field of the tables to be auto-numbering.
    I would like to know if this autonumbering is possible or not? what methods in BP_EEW should i use to implement this logic. I 'm very new to CRM2007, so I'm still not very familiar on how to use the objects generated by the component workbench.
    p.s.
    I've already search the forum but can find any relevant topic related to my request. If you have any known related topic, It would be highly appreciated.
    Thanks and regards,
    JP
    Edited by: John Paul Auditor on Sep 1, 2009 3:36 AM

    Dear Syed,
       You can do many things in table maintenance screen like validation of some field, making some field required or displayed etc.
       For auto increment you have to use Number-Ranges. FM NUMBER_GET_NEXT is helpful in this case.
       Where to write the code??? The Function-Group you have made. There will be includes. You can easily locate the place to write these codes.
       Caution point is that if you re-generate the table maintenance then all code will be gone.
    Regards,
    Deva.

  • Auto update of time/date in a table cell in pages

    I used to be able to do this in older versions.
    In pages when I have a table cell with time/date I would like to have the current date show up every time I open the document. Not on every date in the document, but just in a set cell in a  table.

    Hi Brian,
    Use the NOW function.
    Menu > Insert > Formula > Edit Formula
    Regards,
    Ian.

  • How to stop editing in a table cell

    i m using JTextArea as renderer and editor for table cell. While editing i want to stop editing in that cell at some perticular instance. i have used stopCellEditing() function on TableCellEditor but still the Caret does not goes away and when i press any key it still types that character at that place. I want to hide the Caret and do not want any character to print in the cell after calling stopCellEditing().

    What you have already done, and the resulting behavior is unclear from your post. Post more details.

Maybe you are looking for

  • "hybrid" color found in iTunes's "Devices - iPod" usage meter

    Hi there, I don't believe this is a quirk with iTunes, but it still eludes me nonetheless. I noticed it this morning for the first time when disconnecting my iPod. Granted, we have that handy color-coded usage meter showing how much storage space we

  • More about Adaptive Job Server - BO XI 3.1 Server

    Hello, Can some one provide me some detail infromation abour "Adaptive Job Server" in BO XI 3.1. I am looking more details towords the funcationality of this server. Why it is added sprately in 3.1 and was not there in R2.1 Many Thanks.

  • HOORAY for the board admins

    I just wanted to acknowledge the long hours of reading through and replying to troubled users' posts and complaints. You guys show amazing tolerance and sensitivity to a variety of issues posted by sometimes frustrated users of a myriad of products.

  • 64bit on sun solaris

    Hi, When i'm tring to run java -server -d64 on solaris 5.8 with sparcv9 (the machine is working in 64bit) i'm getting the message: execv(): No such file or directory any idea? Thanks Asaf

  • Will the Software Update to 10.4.7 install firmware upgrade for SuperDrive?

    Will the Software Update to 10.4.7 install firmware upgrade for a SuperDrive? I have a Mac mini and I've just let the Software Update run as needed, but I am confused by the number of Apple update downloads listed. I don't believe I need them, when I