views:

300

answers:

3

There are all kinds of JQuery widgets that offer some nice features like sorting by a columns (like http://tablesorter.com/docs/ or http://www.datatables.net/)

I haven't found one that integrates with server side sorting though. I have the following requirements:

  1. sort by clicked column (server side sort)
  2. filter by a text field over each column
  3. selectable which columns to display

any suggestions on a widget that has some or all of these criteria?

thanks

+1  A: 

Honestly, I would prefer to roll my own in this situation. Filtering is especially easy using jQuery: $('tr > td.columnName').each(...); just set the display style of the row to none if it doesn't match, block otherwise. Hiding columns can be done in a similar manner. Sorting isn't too bad--though notably more complicated. You need to sort (which can take a while, depending on your algorithm) and then place the rows into the table in the order you determined.

Alternatively, find a plug-in that has sorting accomplished, but also generates simple markup, so you can extend it with your own filtering.

geowa4
A: 

As a step up from rolling your own (which is not a bad suggestion, BTW), try this jQuery plugin out: Ingrid. The descriptions of the code talk about using server side data generation.

Tony Miller
A: 
Tawani