同类最佳的 JavaScript 数据表小部件/库 [英] Best-of-breed JavaScript datatable widget/library
问题描述
我过去使用过几个数据表小部件,包括 YUI2 的,并且我很想知道那里是否有公认的领跑者.我对 jQuery Grid 感到很兴奋,但我还没有看到自宣布以来的任何事情.
I've used a couple datatable widgets in the past, including YUI2's, and I'm curious to know if there's a perceived frontrunner out there. I'm excited for jQuery Grid, but I haven't seen anything since it was announced.
我希望在数据表提供程序中看到的内容:
What I'd like to see in a datatable provider:
可以使用任意对象的键值对的JSON数组;YUI2 声明模式以将这些对象映射到列的能力做得很好(尽管 API 的其余部分有点冗长、笨拙).
Can consume JSON arrays of arbitrary objects' key-value pairs; YUI2's ability to declare a schema to map these objects to columns does well (even though rest of the API is a bit verbose, clunky).
提供通过文本字段过滤的能力
Provides an ability to filter via text fields
支持客户端分页(能够与服务器端分页交换会更好).
Supports client-side pagination (an ability to swap out with server-side pagination would be a plus).
支持使用任意 HTML(链接、图像等)自定义单元格的表示/格式
Supports a means to customize the presentation/format of cells with arbitrary HTML (links, images, etc.)
在没有进一步指导的情况下,我可能会研究 DataTables 和 YUI3 数据表.推荐?
With no further guidance, I'm likely to look into DataTables and YUI3 DataTable. Recommendations?
推荐答案
我还没有研究过 YUI3,但据我所知它比 2 有了很大的改进.这听起来可能有点异端,但你有没有想过推出自己的?我真的一直在研究 KnockoutJS,他们有一个带有分页的 DataGrid 的简单示例.我相信它可以很容易地扩展.http://knockoutjs.com/examples/grid.html
I haven't investigated the YUI3 yet but from what I hear it's vastly improved from 2. It might sound heretical but have you thought of rolling your own? I've really been digging KnockoutJS, and they have a simple example of a DataGrid with paging. I'm sure it could be extended pretty easily. http://knockoutjs.com/examples/grid.html
我还在生产环境中使用了 jQuery DataTables.诚然,这是一个简单的用例,但似乎没有出现任何问题.
I've also used jQuery DataTables in a production environment. Admittedly, it was a simple use case but it didn't seem to present any problems.
这篇关于同类最佳的 JavaScript 数据表小部件/库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!