TableViewer - sorting [message #297342] |
Thu, 12 January 2006 08:11 |
Eclipse User |
|
|
|
Originally posted by: popeye.netcabo.pt
When data is shown in the tableviewer, the data by default is sorted on any column or it simple puts the data in the table as it got the data from the input object? which is the sorter mechanism by default?
The point is that i want to add some row entries, 1 by one, in the table after it has been created and shown and i want that the new messages appear in the top of the table instead of being sorted by anything.
Thanks,
Marco
|
|
|
|
Re: TableViewer - sorting [message #297404 is a reply to message #297376] |
Fri, 13 January 2006 00:48 |
Eclipse User |
|
|
|
Originally posted by: popeye.netcabo.pt
This method is for update the viewer. it doesn't affect the model and is to be used inside a content provider when the new data is already present in the object input data. i want to affect the model, i.e., add a new entry in the input object after the viewer has been shown. i'm doing it. but when the object input data is displayed in the viewer the new message appear somehow sorted. i thought that it was straightforward, due to the last message(the new) has been placed in the top(or end) of my data structure (an ArrayList). I suspect that the viewer has a sorter by default. What is the default sorter mechanism? how can i disable it? or change it?
Thanks,
Marco
|
|
|
Re: TableViewer - sorting [message #297409 is a reply to message #297376] |
Fri, 13 January 2006 07:12 |
Eclipse User |
|
|
|
Originally posted by: popeye.netcabo.pt
thank you for the help, its working...
i put the viewer.insert(obj, 0) instead of the normal viewer.add(obj) in the inputChanged method of my content provider class.
at first, i didn't understood what you meant with that method. then after some hours i saw the solution...a bit dumb, but i'm a beginner.
|
|
|
Powered by
FUDForum. Page generated in 0.08305 seconds