Skip to main content



      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 07:56 Go to next message
Eclipse UserFriend
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 103 times)
  • Attachment: After.png
    (Size: 3.13KB, Downloaded 100 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 09:18 Go to previous messageGo to next message
Eclipse UserFriend
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 01:19 Go to previous messageGo to next message
Eclipse UserFriend
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 02:33 Go to previous messageGo to next message
Eclipse UserFriend
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 05:58 Go to previous messageGo to next message
Eclipse UserFriend
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 06:02 Go to previous message
Eclipse UserFriend
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: Sat May 24 05:46:36 EDT 2025

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

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

Back to the top