APEX更改IG中的行颜色

时间:2019-12-19 22:12:58

标签: oracle-apex oracle-apex-5.1

我正在跟踪一个我在网上找到的示例,因为自从我在互联网上找到它以来,我知道它一定是正确的。我正在尝试在IG中搜索特定值,当找到该值时,行/行将以红色文本突出显示,在其下方是我遵循的逻辑和屏幕截图。请让我知道我想念的东西。他以员工为例,而我以汽车经销商为例。谢谢!

"Here's another approach that works great:
 For an IR with this query:
 select EMPNO,      ENAME,      JOB,      MGR,      HIREDATE,      SAL,      COMM,      DEPTNO,      
    OFFSITE
 from EMP
 Define for the column JOB the following Static ID: MANAGER_STATIC
 Then create a DA After Refresh on Region where On True Execute the following javascript with Fire 
on Page Load=ON:
this.affectedElements.find('td[headers="MANAGER_STATIC"]').each(function(i) {
var lThis = $(this);
if (lThis.text() == "MANAGER") {
lThis.parent().children().css({
"background-color": "#C0C0C0"
});
}
});
 And every row that has the value of MANAGER will be highlighted and this will respect pagination.

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

该示例似乎是用于交互式报表的,但是您似乎正在使用交互式网格。

最简单的方法(无需编码)是运行报表并使用“动作”按钮定义“突出显示”。例如

enter image description here

填写与此类似的表格(将列选择和值更改为您的要求): enter image description here

然后,再次使用“操作”按钮来报告->保存报告,以便为所有用户保存报告。