Reputation: 23
I have created table in javafx2.2 with filter for filtering data. For example I have two columns like (First Name , Last Name). The First Name column has same name in many rows with different Last Name. So i would like to add two filter for filtering First Name then i like to filter Last Name Based on First Name Filter.
Upvotes: 1
Views: 2369
Reputation: 3654
Look at the TableView#getSortOrder
method :
public final ObservableList<TableColumn<S,?>> getSortOrder()
Returns:
An ObservableList containing zero or more TableColumn instances.
The sortOrder list defines the order in which TableColumn instances are sorted:
TableColumn.sortable
is true). You just have to put first and last columns there having previously setSortable(true)
called for both columns.
Upvotes: 1