Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » add rows to TableViewer dynamically
add rows to TableViewer dynamically [message #499301] Fri, 20 November 2009 17:34 Go to next message
Yuzhang Han is currently offline Yuzhang HanFriend
Messages: 19
Registered: September 2009
Junior Member
Hi there,
could anyone tell me how to add and remove rows in a TableViewer dynamically?

I mean that there is a text-file recording how many rows should be there and what are the tittles of the rows. During eclipse is running, modifications to this file is always observed so that if there is a new row added in this file, a new row should be added to the TableViewer and displayed.

Can anyone help me out here? Many many thanks!

[Updated on: Fri, 20 November 2009 17:40]

Report message to a moderator

Re: add rows to TableViewer dynamically [message #499315 is a reply to message #499301] Fri, 20 November 2009 18:35 Go to previous message
Yuzhang Han is currently offline Yuzhang HanFriend
Messages: 19
Registered: September 2009
Junior Member
solution found:
TableViewer viewer;
...
//to insert a row
viewer.insert(ELEMENT, INDEX);
//ELEMENT is the object to add in the table and model
...
//to remove a row
viewer.getTable().remove(INDEX)

[Updated on: Fri, 20 November 2009 18:37]

Report message to a moderator

Previous Topic:How can I make the PDT code formatter work like the Java formatter?
Next Topic:PDT 2.0 PHP Working Set Editing with Hierarchical (Tree) View not possible?
Goto Forum:
  


Current Time: Fri Apr 26 06:03:57 GMT 2024

Powered by FUDForum. Page generated in 0.02918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top