There is very nice blog of Moritz Klein about how to control cell background in an interactive reports, but that does not work with interactive grid. This because items in interactive grid does not have HTML Expression as attribute.
There are some fundamental differences between interactive grid and interactive
Check the blog of.. Moritz Klein here
Create an interactive grid based on HR schema table employees.
Interactive Report Query:
SELECT empno, ename, job, mgr, hiredate, sal, comm, deptno, CASE WHEN sal <= 1500 THEN 'data-style="background-color:green"' WHEN sal > 1500 AND sal <= 3000 THEN 'data-style="background-color:orange"' WHEN sal > 3000 THEN 'data-style="background-color:red"' ELSE NULL END css_style FROM emp
- Change the type of Sell attribute to HTML Expression and add the below code as source
Note: because you are now adding HTML code, you need to use the attribute value as HTML parameter by using &ITEM.
apex.jQuery(this). parent().attr( ‘style’, apex.jQuery(this).attr(‘data-style’) );
this code checks the SPAN tag en adds the same style to its parents.
In case of any question, drop me or Moritz Klein a message.