Search code examples
javascriptjquery-uidatatableyui

Best-of-breed JavaScript datatable widget/library


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:

  • 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).

  • Supports a means to customize the presentation/format of cells with arbitrary HTML (links, images, etc.)

With no further guidance, I'm likely to look into DataTables and YUI3 DataTable. Recommendations?


Solution

  • 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

    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.