【问题标题】:jQuery Scrollable is not firing under update panel in c# asp.netjQuery Scrollable 没有在 c#asp.net 的更新面板下触发
【发布时间】: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 都不起作用。

我查看了以下文章,但无法理解它们。 Link1Link2 & 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(){ $('#&lt;%=gvWebMaster.ClientID %&gt;').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 没有它不工作
  • 请更新您的添加方式

标签: jquery asp.net gridview


【解决方案1】:

终于从here得到了解决方案。他们更新并发布了 ScrollableGridPlugin jQuery 3.0 版,它解决了回发问题。插件在上面的链接中可用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-30
    • 1970-01-01
    相关资源
    最近更新 更多