Results 1 to 2 of 2
  1. #1
    sakara is offline Member
    Join Date
    Apr 2017
    Posts
    1
    Rep Power
    0

    Default TreeTableView - Dynamic Columns - Proplem update only single column

    TreeTableView treeTableView = new TreeTableView(root);

    TreeTableColumn [] tableColumn= new TableColumn[size];

    for( i< size) {

    tableColumn[i] = new TreeTableColumn();

    tableColumn[i].setCellFactory(TextFieldTreeTableCell.forTreeTabl eColumn());

    tableColumn[i].setCellValueFactory(new TreeItemValueProprty("Name"));

    tableColumn[i].setEditable(true);

    treeTableView.getColumns.add(tableColumn(i));
    }

    treeTableView.setEditable(true);

    Here I am try to edit the single column but update the values entire row depends on no of columns.
    Here the columns size are dynamics.Please let me know how to update only single column.

  2. #2
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    398
    Rep Power
    5

    Default Re: TreeTableView - Dynamic Columns - Proplem update only single column

    I am not sure I understand your question, but let's give it a shot:
    - rows usually represent objects
    - columns usually represent properties of that object
    If you want to change a value for a certain cell you have to change the underlying property for your object.
    If you have changed the property and the column graphics does not update automatically (that's a known issue), then you call a method like this as a work-around after updating the property:
    Java FX Code:
    public void updateTable() { 
    		yourTable.getColumns().get(0).setVisible(false);
    		yourTable.getColumns().get(0).setVisible(true);
    	}

Similar Threads

  1. Replies: 2
    Last Post: 02-06-2017, 12:18 PM
  2. Struts2 Jquery Grid Dynamic Columns
    By ramani in forum Struts
    Replies: 1
    Last Post: 10-17-2012, 08:27 PM
  3. Replies: 5
    Last Post: 07-09-2010, 06:14 AM
  4. How to span column headers over several columns
    By thayalan in forum AWT / Swing
    Replies: 0
    Last Post: 06-02-2009, 04:33 PM
  5. dynamic update in swt
    By sandor in forum SWT / JFace
    Replies: 0
    Last Post: 05-14-2007, 08:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •