Repeater and AlternatingItemTemplate

G

Guest

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
 
S

sloan

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>
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top