Link to home
Start Free TrialLog in
Avatar of Dovberman
DovbermanFlag for United States of America

asked on

Need to add a vertical scroll bar to a datalist

Can this be done? I could not find a property to use.

A reference would be helpful.

Thanks,
Avatar of kmt333
kmt333
Flag of United States of America image

You can through CSS
<asp:DataList ID="yourDataList" runat="server">
        <ItemTemplate>
        <div style="width:400px;height:500px; overflow:scroll;">
            // Your Content
        </div>
        </ItemTemplate>
</asp:DataList>

KMT
you can do it indirectly. Put the datalist control inside a div tag with overflow capability. Something like:

<div style="overflow-x: hidden; overflow: scroll; width: 100%; height:500px">
Avatar of Dovberman

ASKER

This places a scroll bar within each row and column.  I need a single scroll bar for the entire list similar to the listview.

Is this possible?

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks,

I have a tutoring appointment at a local high school. I will try it this afternoon.

I found out that my first student was held back 2 grades after "experts" determined that she could not read. Within 15 minutes, I realized that she was highly intelligent but had vision issues.

The Lion's Club is now involved.
Yes, Defining the datalist inside the css statement works.

<div style="overflow: scroll; width: 2in; height:500px">
        <asp:DataList ID="dlstEvalWatch" runat="server" DataKeyField="SymbolID"

Thanks,