Subject: alternatingItemStyle
Posted By: keyvanjan Post Date: 9/1/2006 3:36:49 PM
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>

Reply By: dparsons Reply Date: 9/1/2006 3:48:49 PM
Google is your friend

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

"The one language all programmers understand is profanity."

Go to topic 49174

Return to index page 186
Return to index page 185
Return to index page 184
Return to index page 183
Return to index page 182
Return to index page 181
Return to index page 180
Return to index page 179
Return to index page 178
Return to index page 177