分页gridview中的问题 [英] problem in paging gridview

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

问题描述

我已经创建了一个搜索页面并为gridview启用了分页.

最初,当未单击搜索按钮时,分页效果很好.但是,如果放置了搜索条件,并且当用户单击搜索按钮时,如果针对该特定条件要显示的记录很多,则分页将不起作用

要显示初始gridview,我已将objectdatasource1和objectdatasource2用于搜索按钮,单击

在页面后面的代码中,我为OnPageIndexChanging事件添加了此代码:

i have created a search page and enabled paging for the gridview.

initially when search button is not clicked paging works fine. But when search condition is put, and when user clicks search button if there are many records to display for the specific condition, then the paging doesn''t work

to display initial gridview, I have made objectdatasource1 and objectdatasource2 is for the search button click

in the code behind page i have added this for the OnPageIndexChanging event:

GridView1.PageIndex=e.NewpageIndex

GridView1.DataBind()



有了这个代码,我说的问题就会出现,如何解决呢???会很有帮助的


[edit] SMS拼写已更正-Nelek [/edit]



with this code the problem I said occurs, how to solve this out??? it would be of great help


[edit] SMS spelling corrected - Nelek [/edit]

推荐答案

您好,请检查此链接
希望对您有帮助
如何对所有列进行排序& GridView的分页 [
Hello check this link
I hope this will help you
how to perform sorting for all columns & paging for GridView[^]


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

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