本文介绍了在UserControl中的ScrollDown上实现Load GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在尝试实施这篇文章.. 单击我。我下载了附加的样本,它的工作正常,但我正在尝试创建UserControl。向下滚动时没有加载任何行。我修改了代码看起来像这样.. I am trying to implement this article .. Click Me in a UserControl. I downloaded the sample attached there and its working fine but i am trying to create UserControl out of it. No rows are getting loaded on scrolling down. I modified the code to look like this..var lastProductId = $("#<%=Test1.GridView1.ClientID %> tr:last").children("td:first").html(); //get last table row in order to append the new products var lastRow = $("#<%=Test1.GridView1.ClientID %> tr:last"); AND, b $ b AND,function GetRowsCount() { //Count no. of rows except header row in the grid. var rowCount = $('#<%=Test1.GridView1.ClientID %> tr').length - 1; return rowCount; 它给我的错误:名称''Test1''在当前上下文中不存在。 Test1是我的USerControl的Id。 Test1是UserControl的ID。Its giving me error: The name ''Test1'' does not exist in the current context. Test1 is the Id of my USerControl. Test1 is the ID of UserControl.推荐答案 (#<% = Test1.GridView1.ClientID %> tr:last)。children(td:first)。html(); //获取最后一个表行以附加新产品 var lastRow = ("#<%=Test1.GridView1.ClientID %> tr:last").children("td:first").html(); //get last table row in order to append the new products var lastRow = (#< % = Test1.GridView1.ClientID %> tr:last); ("#<%=Test1.GridView1.ClientID %> tr:last"); AND, AND,function GetRowsCount() { //Count no. of rows except header row in the grid. var rowCount = (' #<%= Test1.GridView1.ClientID%> tr')。length - 1 ; return rowCount; ('#<%=Test1.GridView1.ClientID %> tr').length - 1; return rowCount; 它给我的错误:名称''Test1''在当前上下文中不存在。 Test1是我的USerControl的Id。 Test1是UserControl的ID。Its giving me error: The name ''Test1'' does not exist in the current context. Test1 is the Id of my USerControl. Test1 is the ID of UserControl. 这篇关于在UserControl中的ScrollDown上实现Load GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 13:08