473,387 Members | 3,033 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,387 software developers and data experts.

Repeater and AlternatingItemTemplate

Hi,

I am running into this problem. I have a repeater and trying to use
'AlternatingItemTemplate'.

If I use 'AlternatingItemTemplate' along with 'ItemTemplate' only two out of
several row are displayed. But if I take out the 'AlternatingItemTemplate'
all the rows are displayed.

What am I doing wrong?
Thnx
Jul 21 '06 #1
1 2666
All items should show up.

Here is an example:
<ASP:REPEATER id="MyRepeater" runat="server">
<HeaderTemplate>
<table width="100%" style="font: 8pt verdana">
<tr style="background-color:#DFA894">
<th>
TitleId
</th>
<th>
Title
</th>

</tr>
</HeaderTemplate>
<ItemTemplate>
<tr style="background-color:#FFECD8">
<td>
<%# DataBinder.Eval(Container.DataItem, "TitleId") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Title") %>
</td>

</TD>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr style="background-color:#FDDDBD">
<td>
<%# DataBinder.Eval(Container.DataItem, "TitleId") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Title") %>
</td>

</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</ASP:REPEATER>
"mavrick_101" <ma********@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
Hi,

I am running into this problem. I have a repeater and trying to use
'AlternatingItemTemplate'.

If I use 'AlternatingItemTemplate' along with 'ItemTemplate' only two out
of
several row are displayed. But if I take out the 'AlternatingItemTemplate'
all the rows are displayed.

What am I doing wrong?
Thnx

Jul 21 '06 #2

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

Similar topics

1
by: VIswanathan S | last post by:
Hi All! How to use Data Repeater in VB.NET? Data Fields are Employee Number Name Photo Date of Joining Salary
0
by: Gastin | last post by:
I am digesting a web serivce from Amazon.Com. I have the following class which was autogenerated by VS.NET when I created a Web Reference to...
0
by: Joe Fawcett | last post by:
I'm having a problem binding an asp:repeater control to a Hashtable. Originally my code was: <asp:Repeater id="rptFamily" runat="server" DataSource="<%# family %>"> <ItemTemplate> <%#...
1
by: blugrasmaniac | last post by:
I have discovered that within a <ASP:REPEATER> control, I can specify multiple tags, such as <ItemTemplate> and <AlternatingItemTemplate>. So that I could write code like following: ...
2
by: Gastin | last post by:
I am consuming a web serivce from Amazon.Com. I have the following class which was autogenerated by VS.NET when I created a Web Reference to...
1
by: dinesh | last post by:
When I try to display the result of an sql query into a repeater, I get no data. I've tried the query in the analyzer and it works fine. I get no errors from VS. Note for testing purposes the query...
1
by: Christiaan Nieuwlaat | last post by:
Hi everyone, Could you please help me with this? I need to create a table in which resultdata from a sql server table can be shown and/or edited by using controls, for instance the radiobutton....
0
by: uncensored | last post by:
Hello everyone, I'm fairly new at .Net and I have a repeater inside a repeater problem. I will attach my code to this message but basically what I am able to tell when I run my page it tells me...
2
by: Hong | last post by:
Hi, I have been scratching my head over this problem for hours, the repeater control I am using would only render the controls specified in HeaderTemplate and FooterTemplate, but the repeater...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.