Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8114913

TableView does not sort records when setCellFactory used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • fx2.1
    • fx2.1
    • javafx
    • Windows XP SP3 32-bit, JDK 7u3, JavaFX 2.1 and JavaFX 2.0.3

      In an object of class derived from TableView<MyRecord, String> I am binding columns to data via setCellFactory(). When my form appears on screen with all data fetched and I click any column in the table header to perform sort by that column, nothing happens. I added ListChangeListener object for getSortOrder() property, but it does not work when I click the same column to change sort order type, because there is no column added to / removed from the sort order list.

      Is this a known issue? Do you have any simple working example of a TableView with columns bound to data via setCellFactory(), which can be sorted by any column by mouse clicks?

      Please note, that if I bind data via setCellValueFactory(), everything works as expected. But in this case I am unable to align columns.

      Thank you.

            jgiles Jonathan Giles
            aiurovetsjfx Alexander Iurovetski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: