Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Nattable navigation using up/down/left/right arrows
Nattable navigation using up/down/left/right arrows [message #1392796] Wed, 02 July 2014 21:34 Go to next message
Jimmy Siu is currently offline Jimmy Siu
Messages: 6
Registered: July 2014
Junior Member
HI

I am using a simple Nattable which is by default not editable.

When i am navigating the table using the up/down/left/right arrows to move from one cell to another cell in the table, i have the 'destination' cell in edit mode with the cursor appearing in the cell.

When i am using the mouse to select the cell it is working fine, the cell is not turning into edit mode.

Any suggestions or hint why arrow navigation turns the cell into edit mode ?

Thank you
Re: Nattable navigation using up/down/left/right arrows [message #1393066 is a reply to message #1392796] Thu, 03 July 2014 07:28 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1286
Registered: July 2012
Senior Member
Are you using IEditableRules to configure whether cells are editable or not?
Re: Nattable navigation using up/down/left/right arrows [message #1393333 is a reply to message #1393066] Thu, 03 July 2014 16:25 Go to previous messageGo to next message
Jimmy Siu is currently offline Jimmy Siu
Messages: 6
Registered: July 2014
Junior Member
Hi

To configure if a cell is editable or not i am using the configRegistry.registerConfigAttribute where i configure a specific label to be editbale and i am using the ColumnOverrideLabelAccumulator.registerColumnOverrides to override the column i want to be editable with the specific label.

I am not using specifically IEditableRules.

Re: Nattable navigation using up/down/left/right arrows [message #1393417 is a reply to message #1393333] Thu, 03 July 2014 19:29 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1286
Registered: July 2012
Senior Member
Why are you doing it that way? NatTable has the concept of IEditableRules which allows to specify a rule whether a cell should be editable or not. Operating on the ConfigRegistry itself might cause side effects.
You are facing such an issue, where editing via mouse click is disabled, but you missed the key bindings.

I suggest to use IEditableRules as they are interpreted by the framework for any interaction: https://www.eclipse.org/nattable/documentation.php?page=editing
Re: Nattable navigation using up/down/left/right arrows [message #1393457 is a reply to message #1393417] Thu, 03 July 2014 20:47 Go to previous messageGo to next message
Jimmy Siu is currently offline Jimmy Siu
Messages: 6
Registered: July 2014
Junior Member
Thanks for the info

I am working on some existing code that was written using sourceforge nattable and now updating the code to use nebula nattable.

That's how the code was written using the config registry, i will then look at the IEditableRules to solve the issue i am facing.

[Updated on: Thu, 03 July 2014 20:48]

Report message to a moderator

Re: Nattable navigation using up/down/left/right arrows [message #1394018 is a reply to message #1393457] Fri, 04 July 2014 16:47 Go to previous messageGo to next message
Jimmy Siu is currently offline Jimmy Siu
Messages: 6
Registered: July 2014
Junior Member
I actually don't need the cell to be editable, my table is only for view, so i removed from my code the section described in the link

Quote:

Making cells editable
Editing is turned off by default. To enable editing an IEditableRule has to be registered. Usually you will register an IEditableRule against a cell label if you only want to enable editing for specific conditions like shown in the code below


Still i have the same behavior as when using the mouse to select the cell it works fine but by arrow navigation the cell turns in Edit mode.

Would you know what would be the difference between the sourceforge nattable (where it is working fine) and the nebula nattable that will make the behavior different ?

Thank you
Re: Nattable navigation using up/down/left/right arrows [message #1394070 is a reply to message #1394018] Fri, 04 July 2014 18:48 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1286
Registered: July 2012
Senior Member
Quote:
Would you know what would be the difference between the sourceforge nattable (where it is working fine) and the nebula nattable that will make the behavior different ?


2 years of bugfixing, improvements and refactoring! But the IEditableRule engine hasn't changed.

I don't know what you are doing, how your composition looks like and what stuff you are doing to the ConfigRegistry. But the default behaviour for non-editable cells is added by the DefaultEditConfiguration and the DefaultEditBindings which are added by the DefaultGridLayerConfiguration that is set when using the GridLayer with default configuration turned on. That is also explained in the documentation.

The issue you are describing can not be reproduced in our examples, so it looks like you have done something you shouldn't do, and that causes your issues.

BTW, I see it as a personal defamation to use the outdated sourceforge version, as the project team puts a lot of efforts to make NatTable better! And we worked hard over the last two years to stabilize the codebase.
That said I will not answer any further questions about issues regarding the sourceforge version!
Re: Nattable navigation using up/down/left/right arrows [message #1394183 is a reply to message #1394070] Fri, 04 July 2014 23:11 Go to previous messageGo to next message
Jimmy Siu is currently offline Jimmy Siu
Messages: 6
Registered: July 2014
Junior Member
Thank you for the details.

It is actually old code written years ago using the sourceforge nattable, my intend is NOT to use the outdated sourceforge version but to upgrade all the exiting code to use the nebula nattable.
Re: Nattable navigation using up/down/left/right arrows [message #1395940 is a reply to message #1394183] Mon, 07 July 2014 16:33 Go to previous message
Jimmy Siu is currently offline Jimmy Siu
Messages: 6
Registered: July 2014
Junior Member
Hi

Thanks for your help and direction, i was able to figure out what was in the code that was making that behavior. Some UiBindingRegistry configuration that were making the cell editable, fixing that problem i will be able to upgrade our code to Nebula Natable.

Well thanks for the Nebula Nattable team for their work to make it better and stable.

Previous Topic:Auto resize columns by double clicking on column boundry is not working some time
Next Topic:Setting cell background color
Goto Forum:
  


Current Time: Thu Sep 18 05:59:00 GMT 2014

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

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