I think the main problem is that Repeater
not intended to be horizontal repetition.
Maybe you should try a DataList that lets you specify a RepeatingDirection.
Update
If you do not need to repeat horizontally (for example, your question assumes "... two rows and X columns"), your Repeater
should look like this:
<asp:Repeater ID="RepeaterVersionsForPie" runat="server"> <HeaderTemplate> <table id="VersionsTable"> </HeaderTemplate> <ItemTemplate> <tr> <th><%# Eval("nameVersion") %></th> <td tag='<%#Eval("idVersion")%>'> <%# Eval("DocumentName") %> </td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater>
Note that you should not repeat <table>
in <ItemTemplate>
and use single quotes when you need to put your Eval
inside an attribute.
source share