Hi,I'm using igGrid of IgniteUI 2018.
I have a grid where the background color of the the column should switch to red if the text is error. My current soultion is
js file:
...
{ headerText: 'Status' , key: 'TankStatus' , width: "150px", dataType: 'string', dataType: 'string', template: $( "#colTankStatus").html() },
html file:
<script id="colTankStatus" type="text/template"> {{if ${TankStatus}.indexOf('Error') >= 0}} <div style='background-color: red'> {{else}} <div style='background-color: transparent'> {{/if}}${TankStatus}</div></script>
This solution will set the background-color of the text div. Now I want to set the background color of the cell (td) to red but I have no idea how can I access to the (parent) cell element.
Thanks in advance!
Sorry
I forgot to write that I'm using
rowVirtualization: true,
and
virtualrecordsrender: function(evt, ui) { ...
That might be important
THX