Skip to main content



      Home
Home » Eclipse Projects » NatTable » Set NatTable readonly
Set NatTable readonly [message #1697475] Thu, 04 June 2015 05:17 Go to next message
Eclipse UserFriend
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 05:34 Go to previous message
Eclipse UserFriend
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: Wed Jun 18 18:17:29 EDT 2025

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

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

Back to the top