Hi Experts ,
Recently we have upgraded our APEX to version 5 , after that custom CSS for Alternative Row colouring is not working .
I know APEX 5 has redesigned so table class "apexir_WORKSHEET_DATA" is no longer exists , I used "a-IRR-table" as class name in bellow sample code , but still it is not working .
Can you Please help me to fix this ?
<script type="text/javascript">
// THIS DOES THE STRIPING
function decorateDataGrids (strClass)
{
var tables = document.getElementsByTagName("table");
for (var i=tables.length; i--;)
{
if (tables.className == strClass) {
var gridRows = tables.getElementsByTagName("tr");
for (var j=gridRows.length; j--;) { if (j%2) { gridRows[j].className = "even"; } }
}
}
}
window.onload = function ()
{
decorateDataGrids("a-IRR-table"); // THIS DOES THE STRIPING
}
</script>
<style>
table.a-IRR-table {
border-width: 2px;
border-spacing: 0px;
border-style: none;
border-color: black;
border-collapse: collapse;
}
table.a-IRR-table th {
border-width: 1px;
padding: 4px;
border-style: solid;
border-color: white;
background:#4e4e4e;
font-weight:bold;
color:#fff;
}
table.a-IRR-table td {
border-width: 1px;
padding: 4px;
border-style: dashed;
border-color: black;
}
/* THIS OVERRIDES APEX'S DEFAULT STYLES */
table.a-IRR-table tr.even td {
background-color:#F2F2F2 !important;
}
table.a-IRR-table td {
background-color:#e2e7f1 !important;
border:1px solid #B3B3A7 !important;
padding:4px 8px !important;
}
</style>