I am trying to delete the selected record from the tableview in javafx. Below is how I am populating the table with the data:
public void setMainApp(MainAppClass
Remove the data from the underlying list, not the filtered/sorted list:
FileModel selectedItem = fileTable.getSelectionModel().getSelectedItem(); if (selectedItem != null) { mainApp.getFileData().remove(selectedItem); }