Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Setting certain cells in an editable table column to non-editable doesn't work
Setting certain cells in an editable table column to non-editable doesn't work [message #1067916] Thu, 11 July 2013 04:48 Go to next message
Eclipse UserFriend
We have a table with some editable columns. The cells in this column are marked with a little grey triangle in the upper left corner and if I click in it, I can modify the content of the cell.

However, we have certain business rules which decides if a row in the table can be changed or not (depending on the content of the row).

I added the following code to the editable cells:
@Override
protected void execDecorateCell(Cell cell, ITableRow row) throws ProcessingException {
  if (someBusinessLogic(getCriteriaColumn().getValue(row))) {
    cell.setEditableInternal(false);
  }
}


However, this does not have the desired result. Those cells that should be editable still show the triangle and they are editable. But those cells that should not be editable are still editable, even though they no longer show the triangle.

It seems that the triangle-indicator is updated correctly, but the effective editable-property of the cell is not.

Am I doing something wrong or is this a bug?

[Updated on: Thu, 11 July 2013 04:48] by Moderator

Re: Setting certain cells in an editable table column to non-editable doesn't work [message #1070680 is a reply to message #1067916] Thu, 18 July 2013 08:54 Go to previous messageGo to next message
Eclipse UserFriend
Do not use methods start with internal! Smile

To get there use on the method execIsEditable on any table column. With this way you are able to make a certain cell editable.

Hope that helps...
-andreas
Re: Setting certain cells in an editable table column to non-editable doesn't work [message #1072138 is a reply to message #1070680] Mon, 22 July 2013 02:43 Go to previous message
Eclipse UserFriend
Andreas

Thanks for the hint about execIsEditable(), it works like a charm. I don't know how I could have missed it...

I knew using internal methods (even those *ending* with internal Wink) probably wasn't a good idea, but I was grasping at straws.
Previous Topic:AbstractTool[Form]Button doesn't show
Next Topic:(Manually) handling the wait cursor
Goto Forum:
  


Current Time: Thu Jul 24 15:13:11 EDT 2025

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

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

Back to the top