Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Update / refresh Nattable
Update / refresh Nattable [message #1057836] Thu, 09 May 2013 08:10 Go to next message
Nikhil Shirodkar is currently offline Nikhil ShirodkarFriend
Messages: 9
Registered: May 2013
Junior Member
Hello ,

I have created a nattable , which is in side a Dialog box(JFace).
Along with this nattable the dialog box have few buttons too.
On click of one of these buttons i want to update the Nattable. Update - i.e. I want to change all the rows and data in the matrix.

For that I was trying to use natTable.refresh();
But unfortunately, i am not able to update the Table.

When tried for dispose , the Nattable disposes,but it does not work with refresh.
Am i missing something.

Please help me.


Thanking you in advance.
Re: Update / refresh Nattable [message #1057901 is a reply to message #1057836] Thu, 09 May 2013 15:51 Go to previous messageGo to next message
Nandita Uppalapati is currently offline Nandita UppalapatiFriend
Messages: 16
Registered: March 2013
Junior Member
I have the same issue. I have a natTable with some drop downs outside of it. The very first time when I create a natTable it shows up. But when I choose a different value in the drop down, I am updating my data provider with entirely new rows and columns, disposing off the natTable instance and creating a fresh one using
natTable = new NatTable(parent, gridLayer, false);

When doing this I am creating a new data Provider instance with the new rows and columns, a new bodyLayer, compositeFreezeLayer and the likes. But the new natTable doesn't show up. When I minimize my application and maximize it that is when it shows up. I tried refresh, but I guess refresh only works for the existing instance of natTable and not a new one if I am not wrong. Is this a wrong approach?

[Updated on: Thu, 09 May 2013 15:52]

Report message to a moderator

Re: Update / refresh Nattable [message #1057908 is a reply to message #1057836] Thu, 09 May 2013 17:33 Go to previous messageGo to next message
Nandita Uppalapati is currently offline Nandita UppalapatiFriend
Messages: 16
Registered: March 2013
Junior Member
Mine was a layout issue, unrelated to NatTable.

Thanks
Re: Update / refresh Nattable [message #1057925 is a reply to message #1057908] Thu, 09 May 2013 20:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Well how do you update the data? Usually the issue is related to updating the list itself without changing the reference in the DataProvider
Re: Update / refresh Nattable [message #1057946 is a reply to message #1057925] Fri, 10 May 2013 01:27 Go to previous message
Nikhil Shirodkar is currently offline Nikhil ShirodkarFriend
Messages: 9
Registered: May 2013
Junior Member
Hello Dirk,

Well what I did is..
I exposed the lists containing the Column names and row names.
And on the button click event I changed values of the Column Names and Row Names (as a test).
And then tried for refresh nattable.

And it was not working.


But as you said "the issue is related to updating the list itself without changing the reference in the DataProvider" then I exposed the column Header data provide. And changed some values there. Then refreshed the nattable.

And did work... Smile

At least now I am able to update the row and column headers. Now I will work further to update the whole table.

Thanking you....
Previous Topic:Save to excel
Next Topic:Styling with scroll able NatTable
Goto Forum:
  


Current Time: Thu Apr 25 22:19:32 GMT 2024

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

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

Back to the top