日期:2014-05-16  浏览次数:20499 次

关于Repeater分页和一行显示多列
(一)Repeater  如何绑定一个DataTable数据进行分页,每页显示5条/行。
(二)Repeater 如何一行显示2列以上数据
------解决方案--------------------
Repeater  不支持在控件的事件分页。你读多少行就显示多少行。
显示多列,如:
 <asp:DataList ID="RptLine" runat="server" RepeatColumns="2" Width="720px" CellPadding="2"
                                        CellSpacing="2" RepeatDirection="Horizontal">
                                        <ItemTemplate>
                                            <div style="width: 350px;">
                                                    <ul>
                                                        <li><a href='lineDetailed.aspx?id=<%# Eval("LineId")  %>' class="cgreen2"
                                                            target="_blank">
                                                            <%# Eval("Line1")%></a> </li>
                                                        <li style="vertical-align: bottom">
                                                             <%# Eval("Line2")%>
                                                        </li>