[NatTable]Color Change due to Editing [message #1718908] |
Sat, 02 January 2016 05:00  |
Eclipse User |
|
|
|
Hi
I am a newbie to NatTable. I have a fairly simple requirement.
I am displaying Person Data on the Table and have enabled Editing
Functionality on the Table. Now cells which i have edited should alone
be displayed using ForeGround as RED.
I understand the usage of CellStyleAttribute but in that case, each Cell
needs to have a unique label assigned to it using the LabelAccumulator.
I cannot do this as i need to turn the ForeGround RED after editing has
been performed on a particular CELL.
Looks like a fairly simple requirement when it comes to TableViewer. Not
sure how to do it using NatTable.
Looking for support. I have used EditingSupportExample and
CustomCellStylingExample also.
Regards
Malai
|
|
|
Re: [NatTable]Color Change due to Editing [message #1718910 is a reply to message #1718908] |
Sat, 02 January 2016 08:42  |
Eclipse User |
|
|
|
First, NatTable has its own forum.
I'm not sure why this is a simple requirement to solve with TableViewer, but maybe just because I haven't used TableViewer in such scenarios for quite a while.
If you already know about cell labels and label accumulator, the only missing part is how to know about a cell was edited. NatTable does not have a mechanism that stores if a cell was edited. So you need to add that yourself and then apply a label if the cell was edited.
So you need to implement a custom label accumulator that stores the information which cells have been edited and applies a special label for such cells. To store that information you could use a custom UpdateDataCommandHandler or a custom IDataProvider for example.
The blinking cell examples add temporary labels if a cell value has updated using a property listener mechanism, which could also be an option.
|
|
|
Powered by
FUDForum. Page generated in 0.04220 seconds