Folks- I have a datatable bound to JSON data. I would like to change the background color of a cell based on it’s value and a choice of three other parameters. (for example {“val”: 1.1, “state”: “Above”},{“val”: 0.4, “state”: “Norm”},{“val”: -0.6, “state”: “Below”}. The value of “val” needs to be displayed in the DataTable. However, the paired value of “state” needs to remain hidden, but is tested for the color change. I have successfully changed the background color based on the value of ‘val’ alone. But I need to be able to control when the color gets applied based on whether the state is “Above” or “Below”. The “Above” or “Below” values are discovered based on whether the numeric values are above or below a threshold for five or more consecutive times in the array that I use to build the JSON.
So the question: Is there a way to bind both the data that gets displayed, and associated hidden ‘metadata’ to individual cells, and then access the metadata using something like getCellValue?
Thanks!
-david