Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » how to sort ComboBoxCellEditor in a table(how to sort ComboBoxCellEditor in a table)
how to sort ComboBoxCellEditor in a table [message #651673] Tue, 01 February 2011 08:32 Go to next message
raj is currently offline rajFriend
Messages: 19
Registered: January 2010
Location: hyderabad
Junior Member

Hi ..

How to Sort ComboBoxCellEditor Colum in a table


Regards,
Raj
Re: how to sort ComboBoxCellEditor in a table [message #651937 is a reply to message #651673] Wed, 02 February 2011 06:51 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 2011-02-01 09:32, raj wrote:
> How to Sort ComboBoxCellEditor Colum in a table

You need to sort it's items that you get via getItems().

It might be worth to add one undocumented characteristics:

ComboBoxCellEditor does not clone the items when accepting them nor does
it do so when returning them, this means you can invoke
Arrays.sort with or without your defined Comparator directly on the
return value of getItems() and invoke setItems() again which will
repopulate the CelllEditor with the sorted items.

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:[Preferences] StringFieldEditor misses setter for widthInChars
Next Topic:Programmatically Edit TableViewer
Goto Forum:
  


Current Time: Fri Apr 26 09:39:35 GMT 2024

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

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

Back to the top