如何排序仅在GridView中显示的行? [英] How to sort only displayed rows in gridview?

查看:103
本文介绍了如何排序仅在GridView中显示的行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有分页的GridView,它在每一页显示5条记录。

I have a gridview with paging, which displays 5 records in each page.

我如何能在当前页面的元素进行排序而已?

How can I sort the elements of the current page only?

和其他的页面不应该是那种?

And other pages should not be sort?

我使用ASP.NET和C#.NET。

I am using ASP.NET and C#.NET.

有没有办法在LINQ做到这一点?

Is there any way to do this in LINQ?

感谢你。

推荐答案

您应该只使用一个客户端库,如果你只是想排序显示的内容。这里有一个jQuery中的一个例子: http://tablesorter.com/docs/
有吨他们在那里 - 只是做了一点谷歌搜索。在这一点上它不要紧,你用什么服务器端语言(尽管我的猜测是ASP.NET)

You should just use a client-side library if you just want to sort what is displayed. Here is an example of one in jQuery: http://tablesorter.com/docs/. There are tons of them out there - just do a bit of Googling. At that point it doesn't matter what server side language you use (although my guess is ASP.NET)

这篇关于如何排序仅在GridView中显示的行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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