SASIDHAR.C
SASIDHAR.C

Reputation: 41

How do I add a horizontal scrollbar in a listview?

How do I add a horizontal scrollbar in a listview?

Upvotes: 2

Views: 5491

Answers (1)

alejandrobog
alejandrobog

Reputation: 2101

You can wrap the ListView in a div with fixed height, something like this:

<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>

Upvotes: 4

Related Questions