在ASP.NET中回发时保持水平和垂直ScrollPosition [英] Maintain horizontal and vertical ScrollPosition on Postback in ASP.NET

查看:75
本文介绍了在ASP.NET中回发时保持水平和垂直ScrollPosition的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编码使用ASP.NET C#.
我有一个gridview,有1000条记录,并且我正在对行之一进行内联编辑.
在单击更新"时,我希望网格位于回发发生之前的确切x y位置.
如果您按照使用Page指令MaintainScrollPositionOnPostback="true"的思路进行思考,不,它对我没有帮助
最佳方法是什么?

The coding is in ASP.NET C#.
I have a gridview, with say 1000 records and I am inline editing one of the rows.
On Clicking Update, I would like my Grid to be on the exact x y position it was on before the postback happened.
If you are thinking along the lines of using the Page directive, MaintainScrollPositionOnPostback="true", no, it didnt work for me
What is the most optimal method?

推荐答案

使用 UpdatePanel 控件包装网格.

另一种方法是像使用 jqGrid 组件那样使用ajax.

Another way would be to use ajax instead like using the jqGrid component.

这篇关于在ASP.NET中回发时保持水平和垂直ScrollPosition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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