How to Change Row Color With JavaScript in Condition?
<p>For some reasons i using this javaScript code for highlight rows. I need add condition to this code block. Something like this : </p>

<pre><code> function onGridViewRowSelected(rowIdx, rowIdx2) {
   //bring value via get control and assign
var selRow = getSelectedRow(rowIdx);
//Check Current Row is null or not
if (curSelRow != null) {
   //..TRIED THIS ROW
    if (curSelRow.style.backgroundColor = '#red') {
        //do nothing..
    } else {


        curSelRow.style.backgroundColor = '#ffffff';
    }
}
//come to here if not in condition and check selected row is null or not
if (null != selRow) {
//if in condition ..
    curSelRow = selRow;
    //change current selected row background color
    curSelRow.style.backgroundColor = '#ababab';
}
</code></pre>

<p>} </p>
