jQuery可滚动,可排序,可筛选表 [英] jQuery Scrollable, Sortable, Filterable table

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

问题描述



    $我正在寻找利用jQuery来处理一些非常普遍的请求,我们可以获得不同大小的数据表:滚动,排序和动态过滤。 b $ b
  • 我通过使用固定宽度列的两个单独表格以及实际滚动的相关div容器来处理过去的滚动。然而,这种方法不适用于我所遇到的任何基于jQuery的排序表扩展(tablesorter是我最喜欢的),因为他们希望所有内容都放在一个表中。

  • 对于过滤,他们要求类似于Excel和SharePoint列表的做法(基本上所有列值都列在下拉列表中,允许用户选择/取消选择它们)。我还没有看到类似的东西,尽管听起来可能。
  • 另一个相关的好用功能是能够冻结水平滚动的列。 / li>


理想情况下,我想要一个现有的扩展,但如果没有一个扩展,我也会很感激来自任何jQuery大师的关于如何最好的实施它。我当前的想法是潜入tablesorter并根据需要进行扩展/更新。



为了让事情保持专注,分页不是一个选项(连同任何基于服务器的, )

更新:
我很欣赏迄今为止的答案,但迄今为止所给出的选项都没有涉及过滤方面的一切(说,我必须承认,jqGrid看起来对我未来的一些项目非常有用)。与此同时,我将开发定制过滤解决方案;如果出现问题,我会再次更新。

解决方案

我自己在搜索可排序的表格插件时遇到了这个问题;我对任何建议的小部件都没有留下深刻的印象,但后来我发现了 DataTable ,我印象深刻。我建议检查一下。


I'm looking to utilize jQuery to handle a few very common requests we get for data tables of varying sizes: scrolling, sorting, and dynamic filtering.

  • I've handled scrolling in the past by having two separate tables with fixed width columns, along with associated div containers for the "actual" scrolling. However, this method doesn't work with any of the jQuery-based sorting table extensions that I've come across (tablesorter being my favorite so far) as they want everything in a single table.
  • For filtering, they're requesting something akin to how Excel and SharePoint lists do it (basically all column values are listed in a dropdown, allowing the user to select/deselect them). I haven't seen anything like that yet, although it sounds possible.
  • One other related nice-to-have feature would be the ability to "freeze" a column for horizontal scrolling.

Ideally I'd like an existing extenstion, but if none are out there I'd also appreciate suggestions from any jQuery gurus on how to best implement it. My current thoughts are to dive into tablesorter and extend/update it as necessary.

To hopefully keep things focused, paging is not an option (along with anything server based, for that matter).

Update: I do appreciate the answers so far, but none of the options given so far touch on the filtering aspect at all (that said, I must admit that jqGrid looks very good for some future projects I have). In the meantime I'll work on a custom filtering solution; if it works out I'll update again.

解决方案

I came across this question as I was searching for a sortable table plugin myself; I really wasn't impressed with any of the suggested widgets, but later I discovered DataTables, and I was quite impressed. I recommend checking it out.

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

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