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

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?

  • Keep in  table cell data permanently

    Hi I have a table when i click on add button on the toolbar one empty row should be inserted in the table ok it was fine
    now i need to enter some data into the newly added row then i need to press save button of the tool bar that data should
    be saved in the database.
    In save button's actionperformed method i called like a method.
         first i put this code
    if (modelTable.getView().getCellEditor() != null) {
              modelTable.getView().getCellEditor().stopCellEditing();
              System.out.println("In side Stopcell editing method.");
    for stoping the cell edit before saving the data.
         activally i need object of ModelMode so i used this
    ModelModel saveModelModel =(ModelModel)modelTable.getModel().getValueAt(row,col);
    And also i tried like the following ways
         String name = (String)modelTable.getModel().getValueAt(row,col);
         Object name = modelTable.getModel().getValueAt(row,col);
    but what happened it shows typecasting exception.
    Because the data in the table cell was disappered when we click on save button. so i think maybe
    ModelModel saveModelModel =(ModelModel)modelTable.getModel().getValueAt(row,col);it was not able to catch the data.
    so any suggestion plz for keeping the data in the tablecell .Activally when ever i click any button on the table
    that cell data was vanished.
    If i use hardcoded data in place of getting datafrom the table it was working fine.
    saveButton.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ev) {
                         System.out.println("Save");
                         /*if (modelTable.getView().getCellEditor() != null) {
                          modelTable.getView().getCellEditor().stopCellEditing();
                          System.out.println("In side Stopcell editing method.");
                          // this method will goto setValueAt() in dataTableModel. before going to down code.
                         int row = modelTable.getModel().getRowCount()-1;
                         int col = modelTable.getModel().getColumnCount()-1;
                         MakeController makeController = new MakeController(new MakeUI());
                       MakeModel makeModel= null;                 
                       if(makeUI.getMakeComboBox().getSelectedItem() instanceof  MakeModel)
                             System.out.println("casting worked !!!!!");
                             makeModel= (MakeModel)makeUI.getMakeComboBox().getSelectedItem();
                        else
                             System.out.println("Cast not working ");                   
                         SaveModel saveModelAction = new SaveModel(this);
                         modelValueObj = new ModelValue();
                         saveModelModel = new ModelModel();
                         if(makeModel!=null){
                       modelValueObj.setMake_id(makeModel.getMake_id());     
                         else {
                              System.out.println("Select Make");
                         System.out.println("Row "+ row);
                         //String name = (String)modelTable.getModel().getValueAt(row,0);
                         Object name = (Object)modelTable.getModel().getValueAt(row,0);
                         System.out.println("String ModelName "+name.toString());
                         saveModelModel =(ModelModel)modelTable.getModel().getValueAt(row,0);
                         //System.out.println("ModelName "+saveModelModel.getModel_name());
                         modelValueObj.setModel_id(new Long (108));
                         //modelValueObj.setMake_id(new Long (1001));
                         modelValueObj.setModel_name(saveModelModel.getModel_name());
                         //modelValueObj.setModel_name("M7");
                        modelValueObj.setDisplay_model(new Boolean(true));
                        modelValueObj.setDeleted(new Boolean(false));
                        saveModelAction.setSaveModelValue(modelValueObj);
                         saveModelAction.buildRequest();
                        saveModelAction.execute();
                         boolean result = saveModelAction.retrieveData();
                         /*if (modelTable.getView().getCellEditor() != null) {
                          modelTable.getView().getCellEditor().stopCellEditing();
                          System.out.println("In side Stopcell editing method.");
                          // this method will goto setValueAt() in dataTableModel. before going to down code.

    table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  • How to control the force return in table cell data?

    I have some xml format files.When I import them into FrameMaker,They display as table data.but when the data is very long in table cell,I want to control the new line by myself.for example,I add some \r\n in my xml file data,then in FrameMaker,It can identify the \r\n, force return.In framemaker I don't know the actual symbol that means the newline.How Can I deal with the problem?thank you!

    Hi Russ,
    yes, but you have to agree that forcing a return in the SOURCE content is really not a wise thing to do - It would be better to break the content into multiple paragraphs or used an XSLT to determine the column width and insert your own breaks in a version of the XML for rendering in Frame. If, at a later date, your templates in Frame change to allow wider columns in your table, then you'd have to go back into the source code and change every occurrence of the c/r in the data - Yeuch! Better to transform the data once, before importing into Frame and then if the col-width changes it is a simple task to change the width in the XSLT - personally, I would make sure the EDD and DTD allows multi-lines in the table cell and then break-up the data to fit the table cell size in an XSLT before importing. Then you don't taint your source code...and it is quite easy to do this is an XSLT...

  • 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 ) {

  • 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

  • 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/

  • Setting table cell data dynamically

    All
    If I have the server sending me data. And I want to lookup the row in a tableView to update it. When I try the following the screen does not refresh.
    ObservableList<DataRow> dataList = getTable().getItems();
    marketDataEvent.setNewValue(newValue);
    Do I need to call refresh on the table?

    No need. Found at the cells need to be set as SimpleDoubleProperty, and you need a getter on the SimpleDoubleProperty field.

  • 10.3.1 bug: db diagrams - edit tables - index names can't be edited

    Hi,
    When adding indexes to a table in db diagram, indexes names are not editable anymore in 10.3.1 (used to be in 10.3.0), one has to accept now the default '.._INDEX1' names (which it's bad)
    Thanks

    Thanks for pointing this out. Have logged a bug for this one.
    Meanwhile the workaround is to switch focus on to some other tab of the wizard and back on to the Index page, to get the Name field enabled again.
    Regards,
    Sunil..

  • 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

  • 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)?

  • How to get the data from a table cell

    Could somebody suggest me how I can get the data value from a table cell if I set that cell a Double object previously.
    Thanks very much

    Thanks for camickr's information.
    And thanks uhrand,
    I haven't got it sloved. I am sick on this problem.
    I have the methods to let the table editable. My tableModel code is from Sun Tutorial.
    It has the code like this:
    public int getColumnCount() {
                return columnNames.length;
             public int getRowCount() {
                return data.length;
              public String getColumnName(int col) {
                return columnNames[col];
             public Object getValueAt(int row, int col) {
                return data[row][col];
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
             * Don't need to implement this method unless your table's
             * editable.
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 1) {
                    return false;
                } else {
                    return true;
             * Don't need to implement this method unless your table's
             * data can change.
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                data[row][col] = value;
                fireTableCellUpdated(row, col);
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
            public void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    System.out.println();
                System.out.println("--------------------------");
            }

  • 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);
    }

Maybe you are looking for

  • How do I connect dual PC monitors to my Powermac G5 1.8 GHz?

    I have 2 hp L2335 HD monitors I want to use together. They are both DVI monitors, however my G5 has an ADC and DVI plug for it's monitor inputs. The DVI input works fine but when I bought a universal ADC to DVI adapter from Belkin the monitor does no

  • Schedule Line and Delivery....

    Hi Experts, When I use VA02/3 to diplay a sales order, I select a line item. I double click the line item, and click the 'schedule line' tab. In some cases I may have 2,3 or 4 schedule lines...whatever. On the line when a delivery has been made it di

  • What are the differences between iphoto ios5 and iphoto ios6?

    what are the differences between iphoto ios5 and iphoto ios6?

  • Why does my tool box move up so I can not use it?

    WHY DOES MY TOOL BOX ALL OF A SUDDEN TODAY MOVE UP SO i CAN NOT SEE IT OR USE IT? ALSO i CAN NOT SEE MY BOTTOM TOOL BOX EITHER. WHAT CAN i DO TO CHANGE IT BACK OR DO YOU HAVE TO?

  • CRM report requirement

    Hi SDN, I got the new requirement to create report in BI from CRM standard report "Progress analysis workbench report" which we can see with Tcode "cnpawb" in CRM with input 1000 as controlling area. For this report I came to know all the fields are