TableViewer initial column sort [message #813449] |
Mon, 05 March 2012 09:24 |
Lorand Lorincz Messages: 35 Registered: April 2011 |
Member |
|
|
Hello,
I am trying to set the initial sort column of a table. I am using tableViewer.setComparator(comparator);
tableViewer.getTable().setSortDirection(SWT.UP);
tableViewer.getTable().setSortColumn(column);
The problem is that the sorting occurs only if I call setComparator after setInput(Object) of the TableViewer is called. But, if I call setInput first, then setComparator, and then a call setInput again, the table is sorted with the old sorter. Is this ok, or am I missing something.
I think we should be able to set the sorter before we set the input of the table.
Thanks in advance for your help.
|
|
|
Powered by
FUDForum. Page generated in 0.02787 seconds