Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Modified values of a cell is getting set into other cell when columns are hidden/shown(Modified values of a cell is getting set into other cell when columns are hidden/shown)
Modified values of a cell is getting set into other cell when columns are hidden/shown [message #1821229] Fri, 07 February 2020 12:56 Go to next message
Aswin Kumar is currently offline Aswin KumarFriend
Messages: 9
Registered: April 2019
Junior Member
Hi,

In our NAT table, we are hiding list of columns based on a button. When any of cell of this column is in edit mode & when we try to hide the column. The column are hidden but the particular cell alone is hanging in our table.

i tried to replicate the same with NAT table example, but there it is working fine.

Not sure what is root cause, if anyone point me to the right direction it would be helpful.

Attached Screenshots...
  • Attachment: Before.png
    (Size: 12.10KB, Downloaded 31 times)
  • Attachment: After.png
    (Size: 3.13KB, Downloaded 32 times)
Re: Modified values of a cell is getting set into other cell when columns are hidden/shown [message #1821230 is a reply to message #1821229] Fri, 07 February 2020 14:18 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
Typically if you change the structure of the table a current open editor should close, as it is not possible to update the location of an open editor correctly. Especially as it is not guaranteed that the column for which the editor was open is still visible. Not sure how perform the hide operation, but probably you avoid the default behavior somehow.
Re: Modified values of a cell is getting set into other cell when columns are hidden/shown [message #1821270 is a reply to message #1821230] Mon, 10 February 2020 06:19 Go to previous messageGo to next message
Aswin Kumar is currently offline Aswin KumarFriend
Messages: 9
Registered: April 2019
Junior Member
Hi Drik,

To hide the column, we are using the below code.

chsLayer.hideColumnPositions(connConstants.getColumnsToBeHidden());


i have also tried with NATTAble.docommand as follow.

 MultiColumnHideCommand hideCommand = new MultiColumnHideCommand( chsLayer, colToBeHidden );		 
 NATtable.doCommand(hideCommand);


But still we are facing the same issue.
Re: Modified values of a cell is getting set into other cell when columns are hidden/shown [message #1821271 is a reply to message #1821270] Mon, 10 February 2020 07:33 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
And how are you doing this? There are FocusListener in place that will close an active cell editor if the editor looses the focus
Re: Modified values of a cell is getting set into other cell when columns are hidden/shown [message #1821538 is a reply to message #1821271] Fri, 14 February 2020 10:58 Go to previous messageGo to next message
Shreya Suman is currently offline Shreya SumanFriend
Messages: 13
Registered: March 2017
Junior Member
Hi Dirk,

we have nattable embedded into a view having other components. when we click on anything within the nattable then the cells that is being edited loses focus correctly and modified value is set in cell.
But instead of doing mouse click on nattable, if we click on any other widget or menu action in the view which contains the nattable, then the editable cell is not loosing focus.

i have attached a sample image to show the layout

we want the cell to loose focus and the edited value should get set in the cell everytime we do a mouse click anywhere in the UI.
Re: Modified values of a cell is getting set into other cell when columns are hidden/shown [message #1821539 is a reply to message #1821538] Fri, 14 February 2020 11:02 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
There is no focus on a cell. If you click somewhere outside the editor it should loose focus. Especially if you click any widget outside nattable.

If it does not you need to debug in the listeners added by the AbstractCellEditor. From a picture I can't tell why it is not working in your environment while it works in all other scenarios.
Previous Topic:Repository link for latest release
Next Topic:NatTable 2.0 - dynamic scaling
Goto Forum:
  


Current Time: Tue Jun 15 18:49:57 GMT 2021

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

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

Back to the top