I am using Displaytag to display a DataGrid. Now I have to change the color of the lines based on some calculations. For example, if
column3 + column4> coulmn5 value, then the row color should be yellow
column value 3 + column4 <coulmn5, then the color of the row should be red.
column3 + column4 = coulmn5 value, then the row color should be white
I think the only way to do this is to use the getElementByID () method
Note : I do not want to consider the solution using getElementsByTagName()[index], the reason may be later in the ordering of the columns.
I am currently using the following code that I want to change.
var rows = tbody.getElementsByTagName("tr");
Iterate Object Lines
var tdObj = rows[i].getElementsByTagName("td")[3]