Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jface tableviewer multi sort columns  RSS feed

Malcom Tomase
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear all,
i am implementing a tableviewer that is able to sort values depengin on their column order. e.g. column1-column2-columnX sorts the rows first on the values of column 1, then column 2, column....
Therefore i want to use a ColumnViewerSorter, especially the method "int doCompare(Viewer viewer, Object e1, Object e2);"
inside this method i want to sort depending on other Tableviewer Row/Cells for comparison and the difficulty is that JFace tableviewer does the sort in the view only, so i have to "ask" the tableviewer itself for the actual

value of e.g. "column 1, row 20"

using the function "viewer.getElementAt(index)" inside "docompare" wold be ok, but inside docompare i do have no reference to the objects e1 and e2 position in the tableviewer.

how could i achieve that?

thanking you very much in advance for helping me

best regards,

Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!