tags:

views:

54

answers:

3

Is there any jQuery plugin that can group data - either list or table - based on my criteria?

For example:

$("table").grouping({column: 1});

or

$("ul li").grouping({getgroup: function(item) { 
   return $(item).text().substr(0, 10); }
});

Something like this. The point here is that I need to change group dynamically - for example, user clicks "group by column 2" and I call $("table").groupby({column: 2}) and table is re-structured (and orders are grouped by customer company instead of customer name).

A: 

Maybe you should have a look at the Tablesorter plugin for jQuery. It can at least fix your table sorting problem.

Edwin V.
I don't have any sorting problem.
queen3
+2  A: 

tableGroup (in combination with tablesorter?) seems to be doing what you want but also seems unmaintained

jitter
Yes, two years old is very old... but I think I can tweak it if there's nothing else.
queen3
A: 

Now, jqGrid can do this - finally, oh yeah! So I change the answer.

queen3