在gridview上保持滚动位置 [英] maintain scroll position on gridview
本文介绍了在gridview上保持滚动位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
维护pagepostback上的gridview滚动位置。
谢谢
解决方案
2个解决方法
添加MaintainScrollPositionOnPostback属于ASP.Net标题的属性,如...
< ![CDATA [<%@ Page 语言 = C# AutoEventWireup = true CodeFile = De fault.aspx.cs 继承 = _默认 MaintainScrollPositionOnPostback = true % > ]]>
或者,您可以随时在gridviewrow中添加ID(可能是tr)
< 表 > < tbody > < tr id = OverHere > .... < / tr > < / tbody > < / table >
将用户转移到帖子上的地址,如
http://theAddress/thepage.htm #OverHere
hi,
Maintain gridview scroll position on pagepostback.
Thanks
解决方案
2 workarounds
Add "MaintainScrollPositionOnPostback" property to your ASP.Net header as in...
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" MaintainScrollPositionOnPostback="true" %>]]>
Or, you can always add an ID to your gridviewrow somewhere (it could be the tr)
<table><tbody><tr id="OverHere"> .... </tr></tbody></table>
And transfer user to the address on post as in
http://theAddress/thepage.htm#OverHere
这篇关于在gridview上保持滚动位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文