Datalist with Conditional Formatting
Datalist with Conditional Formatting
(OP)
Hi
Can anyone advise how I change the colour of the 'SINST' dataitem value to red if it is say under 50?
<td width="60" align="center"><%# GetPatchInstall(DataBinder.Eval(Container.DataItem,"SINST")) %></TD>
Please advise if you need to see further code or need further information.
Thanks
Steve
Can anyone advise how I change the colour of the 'SINST' dataitem value to red if it is say under 50?
<td width="60" align="center"><%# GetPatchInstall(DataBinder.Eval(Container.DataItem,"SINST")) %></TD>
Please advise if you need to see further code or need further information.
Thanks
Steve
RE: Datalist with Conditional Formatting
I would instead place a literal or label object there, and in the code-behind (ItemDataBound event), use .FindControl("your label name") to get a reference to the control.
From there, you can check the value and set the background color of the literal or label accordingly.