How to sort only displayed rows in gridview?

有些话、适合烂在心里 提交于 2019-12-13 01:24:27

问题


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?

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

Is there any way to do this in LINQ?

Thank You.


回答1:


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)



来源:https://stackoverflow.com/questions/2409153/how-to-sort-only-displayed-rows-in-gridview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!