如何在列表视图中添加水平滚动条?
答案 0 :(得分:4)
您可以将ListView包装在具有固定高度的div中,如下所示:
<div style=" height:300px; overflow:scroll;">
<asp:ListView ID="ListView2" DataSourceID="EmployeeOCDS" runat="server">
<ItemTemplate>
<tr>
</tr>
</ItemTemplate>
<LayoutTemplate>
<table id="itemPlaceholderContainer" runat="server" border="0" style="">
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
</asp:ListView>
</div>