开发者

TableViewer initial sorting

I have a problem with JFace TableViewer in RCP. Basically I have a table with 4 rows, and as input I give an already sorted list of elements. So I expect that first element in my input list is first row in a table. However, the TableViewer reorders the elements, and shows them sorted in DESC order for first column. Since the value I initially sorted is in last column, this totally changes what I want to have.

The questions are:

  1. Is there chance to disable this sorting that TableViewer does?
  2. If not, what would be the solution of sorting after the input has been set? I have a comparator set that reacts on selection of table header, an开发者_运维问答d sorts the columns, so can I use this for example?


Uf, my mistake.. My comparator was initialized to sort first column in DESC order. So sorry, there is actually no problem :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜