Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Disable row selection in NatTable
Disable row selection in NatTable [message #1706837] Mon, 31 August 2015 12:47 Go to next message
Ines El Euch is currently offline Ines El EuchFriend
Messages: 35
Registered: March 2015
Member
Hello everyone,

I would like to disable the selection of the rows in NatTable. How can I do that ? I am using a GlazedList and I tried to get rid of the selectionLayer but I could not. The version of NatTable I am using is 1.3.0.

Best regards,
Inès E.
Re: Disable row selection in NatTable [message #1706838 is a reply to message #1706837] Mon, 31 August 2015 12:49 Go to previous messageGo to next message
Arye Shemesh is currently offline Arye ShemeshFriend
Messages: 37
Registered: November 2012
Member
What was the problem when you tried to remove the selection layer?
Re: Disable row selection in NatTable [message #1706839 is a reply to message #1706838] Mon, 31 August 2015 12:54 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I don't understand the question. If you don't want to use the SelectionLayer, simply don't add it to your body layer stack.
Re: Disable row selection in NatTable [message #1706845 is a reply to message #1706839] Mon, 31 August 2015 13:05 Go to previous messageGo to next message
Ines El Euch is currently offline Ines El EuchFriend
Messages: 35
Registered: March 2015
Member
Hello,

My other variables used it and need it a selectionLayer as an argument. Therefore, I couldn't remove it simply.
Re: Disable row selection in NatTable [message #1706847 is a reply to message #1706845] Mon, 31 August 2015 13:09 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Sorry, but your explanation is too vague. I don't know how to help with that information.

In general you could also simply try to disable the selection bindings. But I'm not sure if that fits your needs as I don't have enough information.
Re: Disable row selection in NatTable [message #1706848 is a reply to message #1706845] Mon, 31 August 2015 13:09 Go to previous messageGo to next message
Arye Shemesh is currently offline Arye ShemeshFriend
Messages: 37
Registered: November 2012
Member
Either you do not need it, so you can replace it with something else, or you can't replace it so you probably need it.
Re: Disable row selection in NatTable [message #1706850 is a reply to message #1706845] Mon, 31 August 2015 13:09 Go to previous messageGo to next message
Ines El Euch is currently offline Ines El EuchFriend
Messages: 35
Registered: March 2015
Member
The variables are of type :

1) ColumnHeaderLayer
2) RowHeaderLayer
Re: Disable row selection in NatTable [message #1706852 is a reply to message #1706850] Mon, 31 August 2015 13:13 Go to previous messageGo to next message
Ines El Euch is currently offline Ines El EuchFriend
Messages: 35
Registered: March 2015
Member
Hello,

I don't think that I can replace it since like I said my I have other variables that require it. However I don't want the user to be able to select a line, because when he does, all the lines are selected and it is a giant mess. Plus, I don't want to have this feature. To wrap up, I need to have it in my code but I don't want it to be enabled for the user. Hope you understand my issue better. Thanks for replying by the way Smile

Inès E.
Re: Disable row selection in NatTable [message #1706856 is a reply to message #1706852] Mon, 31 August 2015 13:17 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Your explanation is strange. It sounds like you enabled row selection but don't want to have row selection enabled. For me that doesn't make sense. But I don't have the time to discuss your use cases.

As said before, you need to modify the selection bindings. Turn off the auto configuration when creating the SelectionLayer and provide custom SelectionBindings. Have a look at the DefaultSelectionBindings implementation and check which one you need and which not when creating a custom binding configuration.
Re: Disable row selection in NatTable [message #1706858 is a reply to message #1706856] Mon, 31 August 2015 13:23 Go to previous message
Ines El Euch is currently offline Ines El EuchFriend
Messages: 35
Registered: March 2015
Member
Ok, Thank your for your help.

Inès E.
Previous Topic:How to Use Wild-card Filter Support in NatTable
Next Topic:Custom cell painter example bugs
Goto Forum:
  


Current Time: Thu Apr 25 07:02:26 GMT 2024

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

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

Back to the top