【发布时间】:2016-09-19 20:30:58
【问题描述】:
<script src="Style/FreezeGV/ScrollableGridPlugin_ASP.NetAJAX_2.0.js" type="text/javascript"></script>
<script type = "text/javascript">
$(document).ready(function () {
$('#<%=gvWebMaster.ClientID %>').Scrollable({
ScrollHeight: 550
//Width: 950
//,IsInUpdatePanel: true // This parameter must be set to true when the GridView is inside an ASP.Net AJAX UpdatePanel.
});
});
</script>
我有一个 gridview 并放置了可以正常工作的可滚动 jquery。将 gridview 放在 updatepanel 下,因此每当 selectedindexchanged 发生时,可滚动的 jquery 都不起作用。
我查看了以下文章,但无法理解它们。 Link1、Link2 & Link3。只是我这样测试过,但没有奏效。
<script src="Style/FreezeGV/ScrollableGridPlugin_ASP.NetAJAX_2.0.js" type="text/javascript"></script>
<script type = "text/javascript">
$(document).ready(function () {
$('#<%=gvWebMaster.ClientID %>').Scrollable({
ScrollHeight: 550
//Width: 950
//,IsInUpdatePanel: true // This parameter must be set to true when the GridView is inside an ASP.Net AJAX UpdatePanel.
});
});
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
$('#<%=gvWebMaster.ClientID %>').Scrollable({
ScrollHeight: 550
});
</script>
谁能帮我改正我的编码。
【问题讨论】:
-
您在控制台中是否遇到任何错误?
-
没有收到任何错误
-
@shenbagavali 尝试像这样
$(document).ready(function () { function pageLoad(){ $('#<%=gvWebMaster.ClientID %>').Scrollable({ ScrollHeight: 550 //Width: 950 //,IsInUpdatePanel: true // This parameter must be set to true when the GridView is inside an ASP.Net AJAX UpdatePanel. }); } });加载您的代码 -
@Webruster 没有它不工作
-
请更新您的添加方式