xulihang Active Member Licensed User Longtime User Jul 3, 2025 #1 A user of mine is asking if it is possible to filter TableView. By reading this guide: https://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/, we can know that it is possible to filter TableView using FilteredList. But the code is in Java, is there a convenient way to do this in B4J?
A user of mine is asking if it is possible to filter TableView. By reading this guide: https://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/, we can know that it is possible to filter TableView using FilteredList. But the code is in Java, is there a convenient way to do this in B4J?
teddybear Well-Known Member Licensed User Jul 3, 2025 #2 Perhaps you can use the b4xtable for this requirement Upvote 0
stevel05 Expert Licensed User Longtime User Jul 3, 2025 #3 Try this simple example (does not honour sorted columns, you would need to decide how to deal with that) Attachments TableViewFilter.zip 2.4 KB · Views: 51 Last edited: Jul 3, 2025 Upvote 0
Try this simple example (does not honour sorted columns, you would need to decide how to deal with that)
xulihang Active Member Licensed User Longtime User Jul 3, 2025 #4 I see. Store the entire items in a list and update the items in TableView based on the filter. Upvote 0
stevel05 Expert Licensed User Longtime User Jul 3, 2025 #5 xulihang said: I see. Store the entire items in a list and update the items in TableView based on the filter. Click to expand... Yes, similar to the code you posted, but in reverse. Last edited: Jul 3, 2025 Upvote 0
xulihang said: I see. Store the entire items in a list and update the items in TableView based on the filter. Click to expand... Yes, similar to the code you posted, but in reverse.
stevel05 Expert Licensed User Longtime User Jul 3, 2025 #6 This version does honour sorted columns. Attachments TableviewFilter2.zip 2.5 KB · Views: 47 Upvote 0