方式来实现正确的逻辑过滤器在gridview的寻呼 [英] way to implement right logic for FILTER with PAGING in gridview

查看:113
本文介绍了方式来实现正确的逻辑过滤器在gridview的寻呼的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在ASP.NET网站的逻辑问题 - (GridView控件 - 过滤 - 分页)

i have an issue with logic in ASP.NET web site - (gridview - filter - paging)

过滤器组件
    -------
GridView控件组件
    -------
分页组件
    -------

filter component ------- gridview component ------- paging component -------

问题:
结果全部列表显示了第一次加载25 1页。
如果我被一些条件选择滤镜 - 它显示的结果为1 5页。
如果我使用分页(去5(最后)页) - 过滤器崩溃,并显示25的5页

Question: Full list of result shows '1 of 25 pages' on first load. If I choose filter by some condition - it shows result '1 of 5 pages'. And if i use paging (to go to 5 (last) page) - filter is crashed and shows 5 of 25 pages.

如何实现正确的逻辑过滤器,在GridView的寻呼?

How to implement right logic for FILTER with PAGING in gridview?

使用的问候!

推荐答案

的问题是,寻呼机产生HTTP GET与仅仅指刚网页作为参数,所以你的形式值都失去了联系。

The problem is, that the pager generates HTTP GET links with jsut the page as parameter, so your form values are all lost.

您可以像 >与拦截使用jQuery的链接上点击提交表单,而不是建议。

You can solve it like this article proposes with intercepting the click on the link with jquery and submitting the form instead.

或者你可以简单地通过改变搜索表单的方法 GET 解决它。寻呼机只是追加参数设置为当前的URL,这样你的过滤器参数将回寄给在这种情况下采取行动。这种方法详细地示于这篇文章

Or you can solve it simply by changing the method of your search form to GET. The pager just appends the page parameter to the current url, so your filter parameters will be send back to the action in that case. This approach is shown in detail in this article.

这篇关于方式来实现正确的逻辑过滤器在gridview的寻呼的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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