Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Sense custom table background color

I have table in Qlik Sense mashup, I want to set background-color cells where the content is "Y". (I have "Delay" column, wich is boolean Y/N or sometimes empty).

I know it's easy with default table extension, but it isn't good for me, because I want to disable all interactions, and can't hide the little search icon at table-header, which looks awkward if you can't interact. (if you know how can I configure,hide the icon and other attributes of default table extension it's a good option too)

So I'm working with custom table widget. I've tried these codes in JS, but it doesn't work

$('td:contains("Y")').closest('tr').css('background-color','red');

$("#tableID tr:contains('Y')").css("background-color", "red");

Without jQuery "contains()" it works properly but it sets the whole table's background-color.

Thanks in advance !

2 Replies
ajaykakkar93
Specialist
Specialist

hacr-sds
Creator
Creator

Try this: $("[id=DIV-ID]:contains('Y')").css('background-color', 'red');

or something like  $('div[class*="CLASS-Name"]') instead of the ID