Table: Removing not only items, but also all colums [message #509688] |
Sun, 24 January 2010 19:51 |
Simon L. Messages: 22 Registered: January 2010 |
Junior Member |
|
|
Hi,
I have a SWT Table with several columns, and changing datasets to be displayed in the Table. There seems not to be a method to remove Columns from a Table, which I need for clearing and refilling the Table with new data.
I found out, that disposing the Columns works. But isn#t that a bit too brutal? I need to remove them, just as TableItems can be removed by index.
If this isn't possible, please explain :/ and if you can image a workaround, tell me, too
Thanks
|
|
|
Re: Table: Removing not only items, but also all colums [message #509720 is a reply to message #509688] |
Mon, 25 January 2010 03:16 |
Daniel Krügler Messages: 853 Registered: July 2009 |
Senior Member |
|
|
On 24.01.2010 20:51, Simon L. wrote:
> Hi,
> I have a SWT Table with several columns, and changing datasets to be
> displayed in the Table. There seems not to be a method to remove Columns
> from a Table, which I need for clearing and refilling the Table with new
> data.
> I found out, that disposing the Columns works. But isn#t that a bit too
> brutal? I need to remove them, just as TableItems can be removed by index.
>
> If this isn't possible, please explain :/ and if you can image a
> workaround, tell me, too :)
Disposing the column is the right thing to do. Some might suggest to set
the width to 0, but this is clearly a different thing. E.g. we have
written our own table configuration dialog which allows users to
change settings of individual columns (e.g. sort order, enablement,
disablement, etc.). If the column has not been disposed, it's still
part of the table.
- Daniel
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24145 seconds