我有 jQuery 函数,它允许我的 gridview 滚动,但是当我添加更新面板时,滚动条消失了,结果只是填满了整个页面。当我添加一个更新面板的触发按钮时,这个问题就发生了。这是我页面标题部分的内容:
<script src="Scripts/gridviewScroll.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
gridviewScroll();
});
function gridviewScroll() {
$('#gvMain').gridviewScroll({
width: 900,
height: 500,
arrowsize: 30,
varrowtopimg: "Images/arrowvt.png",
varrowbottomimg: "Images/arrowvb.png",
harrowleftimg: "Images/arrowhl.png",
harrowrightimg: "Images/arrowhr.png"
});
}
这是我的标记:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div>
<asp:GridView ID="gvMain" runat="server" Width="100%" AutoGenerateColumns="False"
......
..........
</asp:GridView>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnClick" />
</Triggers>
</asp:UpdatePanel>