网格排序 [英] sorting in grid

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

问题描述

我要新鲜了

我有一个网格,下面给出了4个字段

[EC号] [公司名称] [到期日期] [到期日期]


我想允许在每一列中按降序排序... n要从到期日"字段中进行默认排序....

假设我想从[公司名称]字段对网格进行排序,因此,如果我单击[公司名称]的标题,则应按该字段对数据进行排序
并假设我想按[Due Amt.]字段对网格进行排序,因此它应按该字段对数据进行排序..反之亦然

请给我提供示例代码

谢谢.

Hi,i m a fresher

i have one grid with the 4 fields as given below

[EC No.] [Firm Name] [Due Amt.] [Due Days.]


i want to allow sorting in each column in descending order...n want default sorting from Due Days fields....

suppose i want to sort grid from [Firm Name] field so if i click on the header of [Firm Name] it should sort data by that field
and suppose i want to sort grid by [Due Amt.] field so it should sort data by that field..vice versa

plz provide me code with example

thank you.

推荐答案

您可以检查此

http://msdn.microsoft.com/en-us/library/aa479347.aspx [ ^ ]

如果要在客户端使用javascript进行排序以提高性能,则可以使用以下jQuery插件.

http://tablesorter.com/docs/ [ ^ ]
You can check this

http://msdn.microsoft.com/en-us/library/aa479347.aspx[^]

If you want to implement the sorting at client side using javascript for better performance in that case you can use following jQuery plugin.

http://tablesorter.com/docs/[^]


这篇关于网格排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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