I have a table with four columns say A B C D. I am using TableViewer to show the results in a table with corresponding headers. Now, I realize that column C is having duplicate values. So I would like to convert this table to a tree using TreeViewer where C will be the parent column and all other rows will be grouped based on that. I have changed the content provider to TreeStructureContentProvider.INSTANCE and also used corresponding TreeViewer classes everywhere. But issue is I can still see the UI in table view only.
Data is somewhat like below:
Table view
-----------------
|A | B | C | D |
-----------------
|a1 b1 c1 d1 |
-----------------
|a2 b2 c1 d2 |
------------------
|a3 b3 c1 d3 |
------------------
|a4 b4 c2 d4 |
-----------------
Required Tree view
---------------
c1
----
a1 b1 d1
-------------
a2 b2 d2
-------------
a3 b3 d3
---------------
c2
---
a4 b4 c4
----------------
How to make C as parent and group other rows accordingly?