Skip to content

Replies

0
sarojanand
sarojanand answered on Jan 8, 2014 7:17 PM

I just want to highlight my entire row if the condition matches but its not working.

.RowTemplate("<tr {{if parseInt(${Ratio}) < 30 }} class='highlight-danger' {{/if}}></tr>")

It gives error: Unable to get value of the property 'replace': object is null or undefined

For this reason I have to add for each cell which works

.RowTemplate("<tr><td {{if parseInt(${Ratio}) < 30 }} class='highlight-danger' {{/if}}>${MarketDate}</td><td {{if parseInt(${Ratio}) < 30 }} class='highlight-danger' {{/if}}>${NGXAbMketMonVolGJ}</td><td {{if parseInt(${Ratio}) < 30 }} class='highlight-danger' {{/if}}>${TransCanadaMonVolGJ}</td><td {{if parseInt(${Ratio}) < 30 }} class='highlight-danger' {{/if}}>${Ratio} %</td><td {{if parseInt(${Ratio}) < 30 }} class='highlight-danger' {{/if}}>${NGXAbMketMonVolPJ}</td><td {{if parseInt(${Ratio}) < 30 }} class='highlight-danger' {{/if}}>${TransCanadaMonVolPJ}</td></tr>")

I dont think this is a good idea to do in every cell. Is there any better alternative or other way for this?