0

I have a tableview where user can double click on a column row & Combo Box drop down will appear with list of items. Here problem is user can only select one value at a time instead I want to allow user to select multiple values.

Existing Implementation using ComboBoxTableCell

List<TableColumn<DITComparatorFileColumnConfigDO, ?>> columnList = new ArrayList<TableColumn<DITComparatorFileColumnConfigDO, ?>>();
TableColumn<DITComparatorFileColumnConfigDO, String> column = null;

column.setCellValueFactory(new PropertyValueFactory<DITComparatorFileColumnConfigDO, String>("primaryColumn"));
column.setCellFactory(ComboBoxTableCell.forTableColumn(FXCollections.observableArrayList(primaryFileHeaders)));
columnList.add(column);

[enter image description here]

Existing Implementation using ChoiceBoxTableCell

column.setCellValueFactory(new PropertyValueFactory<DITComparatorFileColumnConfigDO, String>("secondaryColumn"));    
column.setCellFactory(ChoiceBoxTableCell.forTableColumn(FXCollections.observableArrayList(secondaryFileHeaders)));
columnList.add(column);

enter image description here

4

1 回答 1

1

我已经实现了 TurekBot CheckComboBoxTableCell,它通过在原始文件中将 checkBox 替换为 contolFX checkComboBox 来使用 ComboBoxTableCell 和 CellUtils 实现。

链接到解决方案

我的应用程序的屏幕截图

于 2018-04-01T11:31:52.900 回答