My TableView populates data from the database. When the user clicks on the column heading, he sorts the data based on this. This feature is not available. However, I have too many entries to fill in at a time. Say I have 1000 records, and the table only shows 500. When I sort it based on a column, it only closes the 500 already filled records.
I would like to override the sorting behavior, so when the user clicks the column heading, he reloads the data from the database and provides the necessary information for the "order by" clause in the query. My problem is that I do not know
- How to disable existing sorting behavior. I can set the column sort property to false, but I'm afraid the header will not be clickable.
- How to connect a listener to listen for a column header click event. Is the tableView.getSortOrder () method true? AddListener () is correct?
source share