controling color of boundColumn

O

Ofer

I use the code: <asp:BoundColumn DataField="EFF_END_DT"
SortExpression="EFF_END_DT" HeaderText="Effective End"
DataFormatString="{0:d}">
<ItemStyle ForeColor= '<% # MyColor(
DataBinder.Eval(Container.DataItem, "EFF_END_DT"))%>'></ItemStyle>
</asp:BoundColumn>
to have red date is it is over and blue if not!
But I get an error:
Compiler Error Message: BC30676: 'DataBinding' is not an event of
'System.Web.UI.WebControls.TableItemStyle'.

how can I resolve this?
 
A

Alvin Bruney [MVP - ASP.NET]

you will get more help for this in either the classic ASP newsgroup or the
ASP.NET newsgroup

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
 
O

Ofer

Took me a while to find "dotnet.framework.aspnet"
then again where am I looking for simplicity? :)

Alvin Bruney said:
you will get more help for this in either the classic ASP newsgroup or the
ASP.NET newsgroup

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
Ofer said:
I use the code: <asp:BoundColumn DataField="EFF_END_DT"
SortExpression="EFF_END_DT" HeaderText="Effective End"
DataFormatString="{0:d}">
<ItemStyle ForeColor= '<% # MyColor(
DataBinder.Eval(Container.DataItem, "EFF_END_DT"))%>'></ItemStyle>
</asp:BoundColumn>
to have red date is it is over and blue if not!
But I get an error:
Compiler Error Message: BC30676: 'DataBinding' is not an event of
'System.Web.UI.WebControls.TableItemStyle'.

how can I resolve this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top