简体   繁体   English

如何在具有服务器端分页的asp.net gridview上实现客户端排序?

[英]How to implement client side sorting on an asp.net gridview having server side paging?

I am using asp.net gridview throughout my application but have got new requirement to apply sorting on each column in almost every gridview in the application. 我在整个应用程序中都使用asp.net gridview,但是对应用程序中几乎每个gridview中的每一列都应用了排序的新要求。 Many of the gridviews consist server side paging. 许多gridview包含服务器端分页。 I tried jquery tablesorter plugin for client side sorting and it is working fine, should it work fine with server side paged grids as i think it should be able to sort only current page records (not all the records). 我尝试了用于客户端排序的jquery tablesorter插件,它工作正常,应该与服务器端页面网格一起正常工作,因为我认为它应该只能对当前页面记录(而不是所有记录)进行排序。 If yes then how? 如果是,那怎么办?

In past experience, I've had a lot of trouble using out of the box Microsoft tools with jQuery, especially jQuery plugins. 根据过去的经验,我在将现成的Microsoft工具与jQuery(尤其是jQuery插件)结合使用时遇到了很多麻烦。 Not saying it's impossible, but my recommendation would be to either ditch the out of the box microsoft tools, or use the sorting that comes with them displayed here: http://msdn.microsoft.com/en-us/library/vstudio/hwf94875(v=vs.100).aspx 并不是说这是不可能的,但是我的建议是放弃现成的Microsoft工具,或者使用此处显示的工具附带的排序: http : //msdn.microsoft.com/zh-cn/library/vstudio/ hwf94875(v = vs.100).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM