java - Multiple filter with TableView in javafx -


i have created table in javafx2.2 filter filtering data. example have 2 columns (first name , last name). first name column has same name in many rows different last name. add 2 filter filtering first name filter last name based on first name filter.

look @ tableview#getsortorder method :

public final observablelist<tablecolumn<s,?>> getsortorder()  returns: observablelist containing 0 or more tablecolumn instances. 

the sortorder list defines order in tablecolumn instances sorted:

  • an empty sortorder list means no sorting being applied tableview.
  • if sortorder list contains 1 tablecolumn, tableview sorted using sorttype , comparator properties of tablecolumn (assuming tablecolumn.sortable true).
  • if sortorder list contains multiple tablecolumn instances, tableview sorted based on properties of first tablecolumn. if 2 elements considered equal, second tablecolumn in list used determine ordering. repeats until results tablecolumn comparators considered, if necessary.

you have put first , last columns there having setsortable(true) called both columns.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -