|
Re: TableViewer change column amount depending on Input [message #664362 is a reply to message #664335] |
Fri, 08 April 2011 14:44 |
akoeck Messages: 62 Registered: December 2010 |
Member |
|
|
Ok, solved this with an extra method which is called at cration of the Controls and everytime my Input is changed.
But this leads me to another question. All my values are written in the first column. How do I get the TableViewer to write the ResultSetData in the correct column.
In the ContentProvider i create an array which holds all values of the result set like this:
Column 1 | Column 2 | Column 3
--------------------------------
Value1.1 | Value 2.1 | Value 3.1
Value1.2 | Value 2.2 | Value 3.2
...
Then my array looks like this:
Value1.1, Value 2.1, Value 3.1, Value 1.2, Value 2.2, Value 3.2...
Is this correct or do I have to create an array for every column?
Edit: Ok, I see the problem is that the columIndex is alway 0 in the method getText from the TableLabelProvider....
[Updated on: Fri, 08 April 2011 14:55] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02899 seconds