asp.net 3.5,网格视图分页 [英] asp.net 3.5, grid view paging

查看:59
本文介绍了asp.net 3.5,网格视图分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个aspx页面,在该页面上我有一个网格视图.在网格视图上有两个按钮,因此当用户单击这些按钮时,将打开一个弹出窗口以编辑网格中的数据.我正在使用Java脚本刷新父页面,但我已经做到了,但是现在的问题是,如果用户在第二页上,并且他使用弹出窗口编辑数据,那么网格也将刷新并进入起始页面.


我希望在不更改页面索引的情况下更新数据时刷新网格.

我正在VS 2008上工作.

有办法吗?


感谢在广告中.

Tc

Hi,

i have a aspx page and on that page i have a grid view. On the grid view two buttons are there so when the user clicks on those button a pop up will open to edit the data in the grid. I am using java script to refresh the parent page, i have done that but now the problem is if user is on the second page and he edits the data by using the pop up, so the gird also refreshes and comes to the starting page.


I want that i should refresh the grid as the data is being updated without changing the page index.

I am working on VS 2008.

Is there a way.


Thanks in adv.

Tc

推荐答案

使用完整的回发或部分渲染,可以在刷新gridview之前跟踪当前页面索引.

或仅更新使用JavaScript编辑的行.

您还可以使用回调 [
Using a full postback or partial rendering, you can keep track of current page index before refreshing the gridview.

Or just update the row you just edited using the JavaScript.

You can also use Callback[^] to update the Gridview with data.
Just get the data of the current page index you are on, and refresh/update the grid!


这篇关于asp.net 3.5,网格视图分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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