DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page TableViewer with dynamic number of columns
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Aug 2008
Default TableViewer with dynamic number of columns - 08-28-2008, 12:24 PM

Hi,

I am searching a way to populate dynamic data to a jface tableviewer.
I know the number of columns at runtime. But not to compile Time.

I decided to have a Data object. This Data object has a List of rows.
One row has a few fix columns but additional a list of dynamic columns, which I know at runtime.

I am not so kind with SWT and JFace. The examples and tutorials did not help me. In javascript I would add dynamic attributes to the row object.

Has anybody an idea or a hint for me, what schould I do?

Thanks in advance,
Daniel
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Mar 2008
Default 09-16-2008, 08:22 PM

Quote:
Originally Posted by danielmei View Post
Hi,

I am searching a way to populate dynamic data to a jface tableviewer.
I know the number of columns at runtime. But not to compile Time.

I decided to have a Data object. This Data object has a List of rows.
One row has a few fix columns but additional a list of dynamic columns, which I know at runtime.

I am not so kind with SWT and JFace. The examples and tutorials did not help me. In javascript I would add dynamic attributes to the row object.

Has anybody an idea or a hint for me, what schould I do?

Thanks in advance,
Daniel
Hi

Possibly what you could do to have a TableViewer with all the required columns, then simply set the column width to zero for columns you do not wish to show when certain conditions arise.

Hope this helps a little.

CBMMelb
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum number of fields in a db2 PK?? balteo IBM DB2 3 08-08-2009 05:11 PM
customizing line number stellale Eclipse 0 12-14-2008 10:35 AM
TableViewer and ViewerFilter matt.blye@gmail.com Eclipse 0 08-08-2008 03:01 PM
Separate a five digit number into parts. junaidjee Java 1 07-11-2008 07:40 AM
ComboBoxCellEditor in TableViewer CBMMelb Eclipse 2 05-16-2008 02:22 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com