Hello sirs,
i want to color just one cell of a power table, based on a boolean tag value.
Below you can find the code:
Numeri = [1,2,3,4,5]
for x in Numeri:
TAG = "[Client]NOK_Pressione_%s" % (x)
Valore = system.tag.read(TAG).value
if Valore == True:
if colName == "Pressioni" and rowIndex == (x - 1):
return {'background' : 'yellow'}
Now, with this code i’m able to color the cell, but only if i click on it.
What i would like to accomplish is:
The table should always check if there’s a value change in a tag, then color it’s specific cell automatically, without clicking on the interested cell (all this without the use of a boolean column in the table dataset).
I see now. I made a workaround but it is a bit ugly. I created a dataset on the root container called ‘data’ to hold the power table data and bound the power table’s Data property though the following expression:
This triggers the configureCell extension function when NOK_Pressione_1 changes. You can add in the rest of your tags. I’m sure a more elegant way to trigger the function exists, this is just off the top of my head.
Hello, I am trying to accomplish a similar thing:
I want to highlight only one entire row based on a value of a Memory tag called "Value"
This value is tag is changing dynamically.
This works, but not as well because it doesn't update as soon as my memory tag "Value" changes:
Any suggestion on how to make it update as soon as the tag value changes?
I was thinking of transferring the code to the propertyChange property instead of the ConfigureCell property, but I am stuck:
I would strongly suggest you not do a tag read inside a configureCell method–that can dramatically slow rendering of your table. Bind that tag to a custom property and read that in the method instead.