Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2006, 03:36 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default alternatingItemStyle

I have a datagrid
How can I use alternatingItemStyle to change the backcolor of the table rows?
where should I place it?
<Columns>
 <asp:TemplateColumn>
          <ItemTemplate>
<TR>
  <TD style="BACKGROUND-COLOR: #cae2fb"><p align="center">
 <img src="smiley/<%= "icon"%><%# DataBinder.Eval(Container.DataItem, "postIcon") %><%= ".gif"%>"></img></p>
  </TD>
    <TD style="BACKGROUND-COLOR: #cae2fb"><STRONG><a style="COLOR: #003366" href="viewTopic.aspx?topic_id=<%# DataBinder.Eval(Container.DataItem, "topicID") %>"><%# DataBinder.Eval(Container.DataItem, "topic") %></a></STRONG></TD>
    <TD style="BACKGROUND-COLOR: #cae2fb"><p align=center><%# DataBinder.Eval(Container.DataItem, "reply_count") %></p> </TD>
    <TD style="BACKGROUND-COLOR: #cae2fb"><%# DataBinder.Eval(Container.DataItem, "date_added") %></TD>
    <TD style="BACKGROUND-COLOR: #cae2fb"><a href="profile.aspx?uid=<%# DataBinder.Eval(Container.DataItem, "userid") %>"><%# DataBinder.Eval(Container.DataItem, "firstname") %>&nbsp;<%# DataBinder.Eval(Container.DataItem, "lastname") %></a></TD>
</TR>
 </ItemTemplate>
</asp:TemplateColumn>
</Columns>

 
Old September 1st, 2006, 03:48 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Google is your friend

http://aspnet.4guysfromrolla.com/articles/021605-1.aspx

"The one language all programmers understand is profanity."









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.