Javafx: Re-sorting a column in a TableView

前端 未结 8 1769
春和景丽
春和景丽 2020-12-09 05:22

I have a TableView associated to a TreeView. Each time a node in the TreeView is selected, the TableView is refreshed with different data.

I am able to sort any col

8条回答
  •  暖寄归人
    2020-12-09 05:47

    If your TableView is not reinitialized, you can also do the following:

    TableColumn sortOrder = rooms.getSortOrder().get(0);
    rooms.getSortOrder().clear();
    rooms.getSortOrder().add(sortOrder);
    

提交回复
热议问题