Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Update TableViewer with new data on top of existing one.(Update TableViewer with new data on top of existing one.)
Update TableViewer with new data on top of existing one. [message #1860956] Mon, 11 September 2023 17:22
Nagaraj Kandoor is currently offline Nagaraj KandoorFriend
Messages: 56
Registered: May 2020
Member
Currently i am working on task which requires me to update TableViewer data on top of existing one.

I have a view which extends ViewPart and which displays data in TableViewer.

While loading view i am setting TableViewer data
ex:
viewer.setContentProvider(ArrayContentProvider.getInstance());
viewer.setInput(new String[] { "One", "Two", "Three" });

now i need to update TableViewer without loosing existing data.

i am doing this but i don't see TableViewer is getting updated

Display.getDefault().asyncExec(() -> {
viewer.setContentProvider(ArrayContentProvider.getInstance());
viewer.add(new String[] { "Four", "Five"});

viewer.getControl().setRedraw(true);
viewer.refresh();
});


Any idea why ViewPart tableviewer is not updated new data?

Thanks
Nagaraj
Previous Topic:How to add custom tooltip to ColumnLabelProvider?
Goto Forum:
  


Current Time: Sat Nov 11 06:08:15 GMT 2023

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

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

Back to the top