Cell styler widget for data grids

0
Hi everyone, For anyone who is familiar with the cell styler widget or has experience in java script, I have a question. I have a data grid where I am trying to color a cell when the attribute says a specific thing. I have two statuses titled “IP1” and “IP2”. Whenever either of these values appear in a cell, I need that cell to be flagged green. I am having trouble figuring out how to make this work for both of these values. It only seems to work for one value. Can someone let me know what I am doing wrong? I am not very familiar with javascript. Also, does anyone know if this widget works with reference set selector grids? Doesn’t appear to but wanted to confirm.
asked
1 answers
1

You are doing fine, almost there. If you delete the second line, than the first will work, only showing green cells where their content is IP2. CellStylerGrid gets confused with multiple rules for one column11 apparently.

But you only need one rule:

return ((rowObj.get('Overall_Industry_Priority')==='IP1')||(rowObj.get('Overall_Industry_Priority')==='IP2'))

As you probably figure: || is javascript for ‘or’.

answered