如何根据asp按钮单击时网格控件中的记录向下滚动 [英] How to scroll down based on records present in grid control on asp button click

查看:71
本文介绍了如何根据asp按钮单击时网格控件中的记录向下滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何根据网格控件中的记录向下滚动网页。



例如,





我有员工搜索应用程序,我会在搜索框中输入员工ID并点击搜索按钮,如果记录在网格中不适合当前页面,那么页面需要向下滚动并显示最后一行中的记录,然后页面需要使用jquery和asp.net C#在同一位置。



这里Button是asp.net,并且在按钮的click事件而不是jquery调用的情况下将记录绑定到网格。网格控件没有分页。

解决方案





< blockquote>('html,body')。animate({scrollTop:


(Element).offset()。top},500);



元素来自


Hi,

How to scroll down web page based on records present in grid control.

For Example,


I have Employee Search application, I will enter employee id in search box and click search button, if the records in grid does not fit in current page, then the page need to scroll down and show the record present in last row else then page need to be in same position using jquery and asp.net C#.

Here Button is the asp.net and binding the records to the grid on click event of the button not the jquery call. And there is no pagination for the grid control.

解决方案

Hi,


('html,body').animate({ scrollTop:


(Element).offset().top }, 500);

The Element is get by


这篇关于如何根据asp按钮单击时网格控件中的记录向下滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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