如何在具有中继器的面板中设置滚动条. [英] How to set scrollbar in a panel with repeater.

查看:280
本文介绍了如何在具有中继器的面板中设置滚动条.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个面板和一个中继器.发生的情况是,当我向下拖动垂直栏时,它立即回到顶部位置.
我的代码:

I have a panel and a repeater. What happens is that when I drag the vertical bar down, it immediately goes back to the top position.
My code:

<asp:UpdatePanel ID="UpdatePanel4" runat="server" >
<ContentTemplate>
<asp:Panel ID="Featuredpanel" runat="server"

                         Height="253px"  ScrollBars="Auto"

  style="z-index: 1; left: 210px; top: 488px; position: absolute;border-color:Blue; border-width:thick; height: 887px; width: 710px"  >
<asp:Repeater ID="Featuredrepeater" runat="server" >





Can any help to sort it out.

推荐答案

通过将其放置在Panel或div中来指定Repeater Control的高度.如果记录超过给定的高度,则滚动条应该会出现.我们可以使用下面给出的CSS来实现.

示例:

Specify a height for Repeater Control by placing it in Panel or in div.If the records exceed the given height then Scroll bar should appear .We can achieve by using CSS given below.

Example:

.Panel
{
Height:200px;
width:100%;
overflow-y:scroll;
}


这篇关于如何在具有中继器的面板中设置滚动条.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆