0

Is it possible to choose individual cells only and not entire row from the tableview? Multiple cell selection can be done on the same column.

Uluk Biy
  • 48,655
  • 13
  • 146
  • 153

1 Answers1

0

You can't do this in FXML directly, but you can do so in your controller:

// allow selection of individual cells (instead of entire rows):
tableView.getSelectionModel().setCellSelectionEnabled(true);

// allow selection of multiple cells at once:
tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);

To get the selected cell values you can follow JavaFX TableView how to get cell's data?

Community
  • 1
  • 1
James_D
  • 201,275
  • 16
  • 291
  • 322