绑定图像时滚动查看问题 [英] Scroll pagging problem when bind images

查看:80
本文介绍了绑定图像时滚动查看问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在数据列表或网格视图控件中添加Scroll pagging,





这意味着一个页面加载,数据列表只显示10条记录然后如果用户向下滚动,则接下来的10条将显示,然后接下来......等等.......





i为此找到一个演示,



http://www.aspsnippets.com/Articles/Load-on-demand-data-in-GridView -on-scroll-using-ASPNet-and-jQuery-AJAX.aspx [ ^ ]



当我绑定简单网格视图或dataList时,哪个工作正常,

(简单意味着只绑定文本字段而不是图像而不应用costom css设计)



但是如果我的网格视图有图像和一些其他控件像ratti ng,graph等等,

然后我如何绑定它们,



以上链接的工作原理是:

1.它将初始10条记录绑定到网格视图,

2.在滚动之后,他使用webservice进行调用绑定方法并使用java脚本绑定所有行,



在java脚本中他定义每一行并绑定它们,如下所示:



  var  row = $(  [id $ = gvCustomers] tr).eq( 0 )。clone( true ); 
$( 。name,row).html(customer.find( ContactName)。text());
$( 。city,row).html(customer.find( City)。text());
$( 。postal,row).html(customer.find( PostalCode)。text());
$( 。country,row).html(customer.find( Country)。text());
$( [id $ = gvCustomers])。append(row);







这个java脚本代码只定义文本列,如果我有图像控件,那么我如何绑定图片,



如果我在每一行都有定制设计,那么我如何维护它们,



plz help mee

解决方案

[id


= gvCustomers] tr)。eq( 0 )。clone( true );


。name,row).html(customer.find( ContactName)。text());

I want to add Scroll pagging in data list or Grid View control,


it means one''s the page load,data list show only 10 record and then if user scroll down , then next 10 will show, and then next.. and so on.......


i find a demo for this,

http://www.aspsnippets.com/Articles/Load-on-demand-data-in-GridView-on-scroll-using-ASPNet-and-jQuery-AJAX.aspx[^]

Which Work Fine when i bind Simple Grid view or dataList,
(Simple means bind only text field not images and not apply costom css design)

but if my grid view have image and some other control like ratting,graph and so on,
then how i bind them,

The working of above link is that:
1. it bind intial 10 record to grid view,
2.after scroll, he use webservice for call bind method and bind all rows using java script,

in java script he define every row, and bind them,like this:

var row = $("[id$=gvCustomers] tr").eq(0).clone(true);
            $(".name", row).html(customer.find("ContactName").text());
            $(".city", row).html(customer.find("City").text());
            $(".postal", row).html(customer.find("PostalCode").text());
            $(".country", row).html(customer.find("Country").text());
            $("[id$=gvCustomers]").append(row);




this java script code only define text column,if i have image control,then how i bind that image,

and if i have custom design on every row,then how i maintain them,

plz help mee

解决方案

("[id


=gvCustomers] tr").eq(0).clone(true);


(".name", row).html(customer.find("ContactName").text());


这篇关于绑定图像时滚动查看问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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