如何在pastback上停止页面scoll [英] How to stop page scoll on pastback
本文介绍了如何在pastback上停止页面scoll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在更新面板中有一个gridview。我的ASP.net页面也继承自Master Page。当我点击On
选择的索引更改了gridview的事件。然后页面滚动不保持在其位置。滚动
是重新加载。我尝试过Page MaintainScrollPositionOnPostback =true,但它仍无效。好吧试试用
其他Javascript代码,但仍面临一些已发布的
我尝试过:
i还从后端尝试使用MyGrid.SelectedRow.Focus();但是这里是选择我的gridview的第一行。
解决方案
希望这对你有帮助。
你必须使用javascript为你的gridview设置smartNavigation。
https://www.codeproject.com/Articles/12466/Smart-Navigation-in-Scrollable-Web-Controls
i have a gridview in update panel. as well my ASP.net page is inheriting from Master Page. When i am click On Selected index changed event of gridview. then the page scroll is not maintaining at its position. the scroll is Reloading. I tried Page MaintainScrollPositionOnPostback="true" but it still not working. As Well try with Other Javascript code but still facing some issued
What I have tried:
i have Also tried from backend with MyGrid.SelectedRow.Focus(); but here it is Selecting FIrst row of my gridview.
解决方案
Hope this will help you.
you have to set smartNavigation for your gridview using javascript.
https://www.codeproject.com/Articles/12466/Smart-Navigation-in-Scrollable-Web-Controls
这篇关于如何在pastback上停止页面scoll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文