Reputation: 177
Is it possible to remove columns from NatTable(not just hide) ?
There is that DynamicColumnExample in the NatTable examples, but i just can't seem to figure out how the deletion of a column works. If someone could explain the steps i need to go through and how it should look like, it would be much appreciated.
Thank you!
Upvotes: 1
Views: 311
Reputation: 177
It seems like every change in the list containing columns, given to the column header data provider, is reflected somehow on the UI, even if it's not an event list.
public disposeColumns()
{
columnList.clear();
natTable.doCommand(new StructuralRefreshCommand());
}
Or if you have a setColumns(List columnList) method, you could just call
setColumns(null);
in the disposeColumns() method.
This will work provided that the column header data provider is created based on columnList.
Hope this will help someone else in search for this answer. Cheers!
Upvotes: 1