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.
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?
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...
At least now I am able to update the row and column headers. Now I will work further to update the whole table.