Re: disable the sorting function of the header



I found a diff route to that, I created my own TableRowSorter and I
override the isSortable(int column) function where I always return
false, so the filtering still works but the sorting is disabled.


On Mar 26, 4:45 pm, RedGrittyBrick <RedGrittyBr...@xxxxxxxxxxxxx>
wrote:
malpropio wrote:
I'm using filtering on a jtable so I can't disable rowSorting
altogether but I wont to disable the rowSorting feature thats in the
jtableHeader, does anyone have any idea how the is done ??
thank you

By not using
   table.setAutoCreateRowSorter(true);

and doing the filtering in an AbstractTableModel sub-class instead?

--
RGB

.


Quantcast