• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2037
  • Last Modified:

How do I create a repeater with fixed size that has scrollbars?

I would like to embed a repeater in my page that is 600x400. If the size of the repeater is greater than the defined size I would like scrollbars to appear.
0
tatton777
Asked:
tatton777
  • 3
  • 2
1 Solution
 
Snarf0001Commented:
Easiest way would be to wrap the repeater in a div with the overflow set in css:

<div style="width:600px; height:400px; overflow:scroll;">

        <asp:Repeater ID="Repeater1" runat="server"></asp:Repeater>

</div>
0
 
Snarf0001Commented:
Note that the div could also be set in the repeaters HeaderTemplate and FooterTemplate, but then it won't show up at all if the repeater doesn't have ANY data.
0
 
tatton777Author Commented:
Is there a way to get it to just pop up scrollbars for the vertical?
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
Snarf0001Commented:
Try overflow:auto; instead of scroll.
0
 
Ashutosh VyasFounder, InitQubeCommented:
Or if you are okay with using the Panels. I have been using it all along.

<asp:Panel ID="pnlContainer" runat="Server" Width="100%" Height="300px" ScrollBars="Auto">
            <asp:Repeater.................................... />
</asp:panel>
0
 
tatton777Author Commented:
Thanks for your help!
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now