JavaFX How to get all values of one column from TableView? -



JavaFX How to get all values of one column from TableView? -

i info of 1 column tableview after button click.

i found code

tableposition pos = table.getselectionmodel().getselectedcells().get(0); int row = pos.getrow(); // item here table view type: item item = table.getitems().get(row); tablecolumn col = pos.gettablecolumn(); // gives value in selected cell: string info = (string) col.getcellobservablevalue(item).getvalue();

but code selected cell , have button , cells of 1 column.

can help me pls? thankyou.

just same thing elements of table.getitems():

tablecolumn<mydatatype, string> column = ... ; // column want list<string> columndata = new arraylist<>(); (mydatatype item : table.getitems()) { columndata.add(col.getcellobservablevalue(item).getvalue()); }

where mydatatype info type of tableview.

javafx

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -