Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TableViewer initial column sort
TableViewer initial column sort [message #813449] Mon, 05 March 2012 09:24
Lorand Lorincz is currently offline Lorand LorinczFriend
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.
Previous Topic:Add a listener in SWT Browser
Next Topic:Any pitfalls when using a TreeViewer to show a Table?
Goto Forum:
  


Current Time: Tue Mar 19 07:10:24 GMT 2024

Powered by FUDForum. Page generated in 0.02787 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top