Hi,
I saw your demo regarding subject activity which link mentioned below. However, this is some thing which user can do manually as per condition but is there any way i can get value from setup form as dynamic values.
https://www.foxinfotech.in/2020/05/oracle-apex-highlight-row-based-on-condition.html
Thanks.
Vinish Kapoor
You can also highlight a particular column or all columns based on your SQL condition. For example, change the background color of the employee name to red if the status is INACTIVE:
Now in the HTML expression, specify the span tag as follows:
Hussain
That's fantasist.
Can we execute this on all column by getting query column, which mean if query consist two column or five, it will automatically apply in all column.
Thanks.
Vinish Kapoor
No. You will have to specify the HTML expression to each column.
Hussain
Thank you for your guidance.
afzal
step1 --- at region interactive report---
option-- column css classes ===> emp
step 2--- give static id for a cloumn for which column based value you want to highlight row example -- status
step 3--- write following jquey code at execute page load option
Hussain
Dear Afzal,
Thanks for sharing steps in very detail. However, followed the same which you mentioned but think that made a mistake somewhere. can you please have look at my step which configured in system after that still no colored at cell or line level being appeared.
Following are the steps in bullet form which i did.
Select empno, ename, status,
case when status = 'INACTIVE' then
'red'
else
''
end bgcolor From emp;
<span style="background-color: #BGCOLOR#;">#ENAME#</span>
$(".emp td[headers=status]").each(function(){
celldata= $(this).text();
if (celldata =='INACTIVE')
$(this).parent().children().css('background-color','red');
});
$(".emp td[headers=test]").each(function(){celldata= $(this).text();if (celldata =='active')$(this).parent().children().css('background-color','red');});
Note : Emp table have two type of status few are ACTIVE and rest INACTIVE.
afzal
step 4-- create a dynamic action "afterRefresh"
region-- interactive report
javascript code--
Hussain
Thanks Afzal.
That's working perfectly.
Hussain
Thanks for you guidance and support.
SamSam
Hello,
Can you tell me if it works with Interactive Grid please ?
I have executed this solution on my IG but the color has not changed !
Thank you in advance