Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Set NatTable readonly
Set NatTable readonly [message #1697475] Thu, 04 June 2015 09:17 Go to next message
Björn Seebeck is currently offline Björn SeebeckFriend
Messages: 9
Registered: April 2012
Junior Member

I have a NatTable which contains a couple of editable Columns with CellEditor etc. Now I want to switch the table to readonly mode on the fly.
Is there a simple (generic) way to do this without rebuild of the whole table and without unregistering all CellEditors explicitly?

Re: Set NatTable readonly [message #1697477 is a reply to message #1697475] Thu, 04 June 2015 09:34 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
The important thing here is the IEditableRule. This one is responsible for determine whether a cell is editable or not.

I typically implement my own IEditableRule whose return value is dependent on some attribute. To switch in a readonly mode you change that attribute to return false for isEditable().
Previous Topic:Only Row Edit using Nebula NatTable
Next Topic:Nattable menu invocation when table is empty
Goto Forum:

Current Time: Thu Mar 04 10:54:55 GMT 2021

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

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

Back to the top