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
Hi,

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?

Greetings,
Bjoern
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: 2902
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: Fri Mar 29 05:31:57 GMT 2024

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

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

Back to the top