JQuery table with sorting
There are all kinds of JQuery widgets that offer some cool functionality like sorting by columns (e.g. http://tablesorter.com/docs/ or http://www.datatables.net/ )
I haven't found one that integrates with server side sort. I have the following requirements:
- sort by clicked column (server side sort)
- filter textbox above each column
- choose which columns to display
any suggestions for a widget that has some or all of these criteria?
thanks
a source to share
To be honest, I would rather leave myself in this situation. Filtering is particularly simple using the jQuery: $('tr > td.columnName').each(...)
; just set the display
line style none
if it doesn't match, block
otherwise. You can hide columns in a similar way. Sorting is not that bad, although it is especially difficult. You need to sort (which may take a while, depending on your algorithm) and then put the rows in the table in the order you specify.
Also, look for a plug-in that did the sort but also generates simple markup, so you can extend it with your own filtering.
a source to share
Try Tiny Table . It doesn't require jQuery, but you put a wrapper around it.
http://www.leigeber.com/2009/03/table-sorter http://www.leigeber.com/2009/03/table-sorter
alt text http://www.leigeber.com/wp-content/uploads/2009/03/tiny-table.gif
a source to share
I think DisplayTag is your solution. It was used to display data for servlets, portlets and supports many features like paging, server side sorting.
a source to share