How to capture when in table cell edit

what event could i use to know when a table cell is being edited? I want to change the font color while in edit . “cellEdited” event is after it is edited and that does me no good.

On the ConfigureEditor extension function, set the foreground color.

return {"foreground":"red"}

Well i am using the standard table and was looking for a solution for it. I may have to change to a Power Table if i can’t work around it. Thanks though.

So i have changed to the Power Table and using the suggested ‘return {“foreground”:“red”}’ and this works while editing. Now i want to keep the red after edit to highlight changes. I am not updating the database after edit, i am just creating a new dataset to collect all changes and then will update my database with a ‘save’ button. How can i apply the foreground color after edit? The code below never returns the foreground color. Is this because it is a new dataset?

onCellEdited

import system
self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue)

return {"foreground":"red"}

[quote=“jerry101”]So i have changed to the Power Table and using the suggested ‘return {“foreground”:“red”}’ and this works while editing. Now i want to keep the red after edit to highlight changes. I am not updating the database after edit, i am just creating a new dataset to collect all changes and then will update my database with a ‘save’ button. How can i apply the foreground color after edit? The code below never returns the foreground color. Is this because it is a new dataset?

onCellEdited

[code]
import system
self.data = system.dataset.setValue(self.data, rowIndex, colIndex, newValue)

return {“foreground”:“red”}
[/code][/quote]

My suggestion is to add a hidden column to your table dataset named “original value” or something similar.

Then all you have to do in the edit event is to compare the current cell value to the value in the original value column. If they don’t match then return red for the background color.

With this method the cell only gets highlighted once the user actually changes the value. Plus if they change it back the highlighting goes away.

When you do save the data you can sort through to the dataset to find only the values that have been changed by comparing the 2 columns.