Gridview中的按需分页 [英] On Demand Paging in Gridview

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

问题描述





我想在Gridview的一个页面中显示所有数据,但是当我使用它时,我的系统变得很慢。

请帮助..



谢谢

Hi,

I want to show all data in one page from Gridview but when I am using it my system get very slow.
Please help..

Thank You

推荐答案

我认为你需要使用GridView滚动使用按需数据ASP.Net和jQuery AJAX [ ^ ]。


设置GridView属性 AllowPaging 为true。设置 PageSize (正常10)。

然后在 onPageIndexChanging 事件中记下以下代码。



Set the GridView property AllowPaging to true. Set PageSize(normal its 10).
Then on the onPageIndexChanging event write down the following code.

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
    GridView1.PageIndex = e.NewPageIndex;
    GridView1.DataBind();
}





这就是所有....



thats all....


这篇关于Gridview中的按需分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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