473,398 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Repeater: Different StyleSheets for alternating rows

Hi All,

I am using ASP.NET Repeater Web Control.
I want to use different stylesheets for alternating rows similar to DataGrid
contorl.
How can I do this?

Thanks In Advance
Sachin

Jun 1 '07 #1
1 3253
Basic breakdown of what's avaiable:

<asp:Repeater id="Repeater1" runat="server">
<HeaderTemplate>
HTML and binding expressions here
</HeaderTemplate>
<ItemTemplate>
HTML and binding expressions here, CSS style class, e.g.
<div style="background-color:#E0E0E0" stuff here </div>
</ItemTemplate>
<AlternatingItemTemplate>
HTML and binding expressions , CSS style class, e.g.
<div style="background-color:#FFCC66"alternating stuff here </div>
</AlternatingItemTemplate>
<SeparatorTemplate>
HTML and binding expressions
</SeparatorTemplate>
<FooterTemplate>
HTML and binding expressions
</FooterTemplate>
</asp:Repeater>

Cheers,
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Sachin" wrote:
Hi All,

I am using ASP.NET Repeater Web Control.
I want to use different stylesheets for alternating rows similar to DataGrid
contorl.
How can I do this?

Thanks In Advance
Sachin
Jun 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Scott | last post by:
I'm trying to display a table of my company's departments in a 3 column format with alternating row colors. The department names are being pulled from a database in alphabetical order. I want to...
2
by: Manny Chohan | last post by:
Hi Guys, I have a repeater control bound to a sqldataadapter. I have some rows which are quite large therefore wrapping on to second line. I want to substring the values on itemdatabound before...
9
by: Max Weebler | last post by:
Hi, I have a datagrid built that has an alternating item style that sets the backcolor and ForeColor of its rows. I have 4 template columns. One of them has a LinkButton embedded in it to...
1
by: Jeff | last post by:
Hey asp.net 2.0 I have a repeater control in my webpage (you see my code below). In this control's ItemDataBound event I set the ImageUrl of a Image object. My problem is that when I run this...
3
by: shapper | last post by:
Hello, I am created an Asp.Net 2.0 repeater implementing the ITemplate class. I know my datasource, a datatable has 6 rows, but the repeater only displays the last one. If I add more rows...
1
by: jazzart | last post by:
Hi there, I'm fairly new to programming with Asp.Net 2.0 so I'm finding myself regularly fumbling around in the dark a bit, so to speak. I'm currently using Visual Web Developer and have been...
2
by: John Kotuby | last post by:
Hi all, Thanks in advance for any suggestions... I am using a repeater to display the contents of a DataTable which is bound to it. All the rows in the table are being displayed. In the...
1
by: Lloyd Sheen | last post by:
I have a repeater with header / item / alternate item and footer templates which works great (or at least ok). I want to put an <hr/tag as a separator but as soon as I put that in the output in...
3
by: Emma Middlebrook | last post by:
Hi there, I've been trying to implement a repeater control in an ASP.NET 2 page but I can't seem to get the layout exactly how I want and I'm not sure if it's something that I am doing wrong or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.