html - How to modify layout using an Asp.net Repeater -


i have table in db has 2 columns "car" & "color".

in asp.net application, have repeater within table. repeater looks this:

    <asp:repeater id="repeater_carscolors" runat="server">                 <itemtemplate>                     <tr>                       <td>                                                    <asp:label id="lbl_car" runat="server" text='<%#bind("car")%>'/>                                                           <asp:label id="lbl_color" runat="server" text='<%#bind("color")%>'/>                                           </td>                     </tr>                 </itemtemplate>     </asp:repeater> 

right now, displaying results such:

enter image description here

how can modify repeater that, instead of having 1 item per row, can have multiple ones such:

enter image description here

thanks.

found solution on thread.

<table>     <asp:repeater id="rpttest" runat="server">         <itemtemplate>             <%# (container.itemindex + 4) % 4 == 0 ? "<tr>" : string.empty %>                 <td>                     ... cell contents omitted ...                 </td>             <%# (container.itemindex + 4) % 4 == 3 ? "</tr>" : string.empty %>         </itemtemplate>     </asp:repeater> </table> 

credit original poster.

cheers!


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -