Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Hiding a Column Using NAT TABLE API (Hiding a Column Using NAT TABLE API )
Hiding a Column Using NAT TABLE API [message #1736609] Thu, 30 June 2016 14:46 Go to next message
CHANDRA SEKAR is currently offline CHANDRA SEKARFriend
Messages: 2
Registered: June 2016
Junior Member
Hi Experts,

I am new to this Forum and NAT TABLE Concepts and facing some difficulty in achieving one requirement . So require your URGENT help to get resolution.

I am hiding one of the column say 3rd column using

1. columnhideshowlayer.hideColumnPositions(columnPositions)
(OR)
2. nattable.docommand(new ColumnHideShowLayer(nattable,3);

I also have "Hide Column" and "Show All Columns" popup menus. When I perform "Show All Column", nattable shows all the columns including 3rd column also.

Is there any way to hide the 3rd column permanently so that even after performing "Show All Columns", it should be hidden?

It will be great pleasure that if i can get some ideas ASAP and as well as some code snippet if possible .

Thanks for your immense help.
Re: Hiding a Column Using NAT TABLE API [message #1736676 is a reply to message #1736609] Fri, 01 July 2016 06:47 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Quote:
When I perform "Show All Column", nattable shows all the columns including 3rd column also.


Well that is the intention of the command.

Quote:
Is there any way to hide the 3rd column permanently so that even after performing "Show All Columns", it should be hidden?


Not by default. You could create a custom command handler for the ShowAllColumnsCommand that doesn't trigger ColumnHideShowLayer#showAllColumns() but instead has some logic to only remove those columns that should be made visible again. You could also implement a custom layer that is able to distinguish between columns that are hidden by a user and columns that are hidden by you. Or you could extend the ColumnHideShowLayer to be able to support permanently hidden columns and dynamically hidden columns.

If you are not able to do this by yourself you could also file a feature request and hope someone else is doing the job in NatTable itself.
Re: Hiding a Column Using NAT TABLE API [message #1736737 is a reply to message #1736676] Fri, 01 July 2016 11:47 Go to previous messageGo to next message
CHANDRA SEKAR is currently offline CHANDRA SEKARFriend
Messages: 2
Registered: June 2016
Junior Member
Hi Dirk ,

Thanks for your prompt response and What is meant by feature request ? . How can i get any sample code snippet ?

Since its urgent for me , will i get any sample code for this ?

Re: Hiding a Column Using NAT TABLE API [message #1736760 is a reply to message #1736737] Fri, 01 July 2016 14:33 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Sorry I don't have the time to do this right now. Simply extend the ColumnHideShowLayer and override the necessary methods to leave out your fixed columns. That should be easy.

If you need a more comfortable and dynamically configurable solution you can create a feature request via Bugzilla.

We also offer sponsored development in case your company is willing to sponsore open source development. In that case write me an email.
Previous Topic:Select a row after including a new one
Next Topic:Getting and setting manage
Goto Forum:
  


Current Time: Tue Apr 16 16:28:26 GMT 2024

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

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

Back to the top