Gridview不停留在当前页面 [英] Gridview is not staying at current page

查看:104
本文介绍了Gridview不停留在当前页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了与sqldatasource绑定的Gridview.
AllowPageing = True
在gridview中,我创建了Edit(超链接)和Delete(按钮).
通过单击编辑链接",它将重定向到具有该行数据的另一个页面,以便我们可以通过单击更新"按钮将其更新到网格页面",然后再次重新加载Gridview.

我不希望它保持在我单击编辑"的位置.

我的gridview在updatepannel内部

Asp.net,C#

I created Gridview which is bind with sqldatasource.
AllowPageing =True
In gridview I created Edit(Hyperlink) and Delete(Button).
By clicking Edit Link It redirect to another page having that Row data, so that we can update on that data, by clicking Update button It redirect to Grid Page and reload Gridview again.

I don''t want that it should stay at the position from where I click Edit.

My gridview is inside the updatepannel

Asp.net, C#

推荐答案

按照您的描述,您正在导航到新页面(进行编辑),然后返回到原始页面.您了解ASP.NET不知道此操作与第一次访问网格页之间的区别吗?

要保持该位置,您将需要一个复杂的过程来保持该位置,然后在返回时强制页面滚动到该位置.替代方法可以是使用就地编辑,也可以使用模式对话框来显示编辑页面.
As you describe it you are navigating to a new page (to do the editing) then back to the original page. You understand that ASP.NET does not know the difference between this and visiting the grid page for the first time?

To maintain the position you would need a complicated process to persist the position then force the page to scroll to that position on return. Alternatives could be using in-place editing or use a modal dialog to display the edit page.


这篇关于Gridview不停留在当前页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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