日期:2014-05-18 浏览次数:20505 次
RepeatColumns="3" RepeatDirection="Horizontal"
------解决方案--------------------
<asp:Repeater ID="rptPermission" runat="server" OnItemDataBound="rptPermission_ItemDataBound"> <ItemTemplate> <table class="CheckBox"> <tr style='background-color: <%#((Container.ItemIndex+1)%2==0)?"ControlLight":"#ccc"%>'> <td style="width: 20%" valign="middle"> <asp:Label ID="lbID" runat="server" Text='<%# Bind("ID") %>' Visible="False"></asp:Label> <asp:CheckBox ID="cbPermission" runat="server" Style="width: 150px; display: block;" Text='<%# Bind("Name") %>' /> </td> <td style="width: 100%" valign="top"> <asp:CheckBoxList ID="cblPermission" runat="server" AppendDataBoundItems="true" CellPadding="5" RepeatColumns="4" RepeatDirection="Horizontal" RepeatLayout="Table"> </asp:CheckBoxList> </td> </tr> </table> </ItemTemplate> </asp:Repeater>
------解决方案--------------------