ASP.NET GridView的分页没有回传 [英] ASP.NET GridView pagination without postback

查看:274
本文介绍了ASP.NET GridView的分页没有回传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是一个快速的问题,所有你们的。

Just a quick question for all of you guys.

我有更新面板内的网格视图。我的模态弹出拉这个面板了。我好为止。

I have a Grid View inside Update Panel. My Modal PopUp pulls this Panel up. I am good so far.

然而,当我尝试做的弹出网格视图分页,页面回。

However when I try to do pagination on the popped up grid view, The page Posts Back.

然后,模式弹出消失,因此做我的GridView控件。

Then the Modal PopUp disappears and so does my GridView.

当我再次点击则myButton,它显示模式弹出与网格视图和网格视图下页内容。

When I click on mybutton again, It shows the Modal PopUp with Grid View and the Next Page Contents in Grid View.

有没有什么方法可以让我得到这个网格视图做分页不回发而不失模式弹出?

Is there any way I can get this Grid View to do pagination without Postback and without losing Modal PopUp ?

任何帮助将大大AP preciated。

Any Help would be greatly appreciated.

谢谢,

推荐答案

该页面每次更改GridView控件的页面时,必须回发。

The page must post back each time you change the page of the GridView. However, you can emulate the desired functionality by hooking into the PageIndexChanged event of the GridView:

protected void GridView1_PageIndexChanged(object sender, EventArgs e)
{
    modalPopupExtender1.Show();
}

这篇关于ASP.NET GridView的分页没有回传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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