Help needed Datagrid changing row gives incorrect colors
When i try changing the font color of an item using javascript i dont get the correct results. Using the code below the font color changes to red for all items. I have been trying various permutations but cannot get the correct result. It always changes to red, or blue. But, never black or gray as mentioned. I'm posting my code below.
Thanks
function pickColor (argId) {
if(argId = 'Rolled Over')
return '#d3d3d3';
else return '#000000';
}
<font color="pickColor(<%# DataBinder.Eval(Container, "DataItem.status_flag") %>)">
<DIV class="labelsfieldsmall" style="CURSOR: hand" onclick='selectRecord(<%# DataBinder.Eval(Container, "DataItem.rec_id") %>);'><%# DataBinder.Eval(Container, "DataItem.status_flag") %></DIV>
</font>
Here is what i see when i view source:
function pickColor (argId) {
if(argId = 'Rolled Over')
return '#d3d3d3';
else return '#000000';
}
<font color="pickColor(Rolled Over)">
<font color="pickColor(Pending Activation)">
Thanks
function pickColor (argId) {
if(argId = 'Rolled Over')
return '#d3d3d3';
else return '#000000';
}
<font color="pickColor(<%# DataBinder.Eval(Container, "DataItem.status_flag") %>)">
<DIV class="labelsfieldsmall" style="CURSOR: hand" onclick='selectRecord(<%# DataBinder.Eval(Container, "DataItem.rec_id") %>);'><%# DataBinder.Eval(Container, "DataItem.status_flag") %></DIV>
</font>
Here is what i see when i view source:
function pickColor (argId) {
if(argId = 'Rolled Over')
return '#d3d3d3';
else return '#000000';
}
<font color="pickColor(Rolled Over)">
<font color="pickColor(Pending Activation)">
Sushant Anand
October 10,