Thursday, 15 April 2010

java - JavaFX TableView how to get cell's data? -


I am using that method to get the whole object.

  tableView GetSelectionModel (). GetSelectedItem ()  

How do I get data from a single cell? Enter image details here
I mean that S20BJ9DZ300266 is a string get?

Assume that you know something, you can < / P>

  TablePosition pos = table.getSelectionModel () getSelectedCells () find (0) .. Int row = pos.getRow (); // Item Here is the table view type: item items = table .getItems (). Get (line); Table column call = pos.getTableColumn (); // It returns the value in the selected cell: string data = (string) col.getCellObservableValue (item) .getValue ();  

No comments:

Post a Comment