views:

41

answers:

2

I need to re-sort a table when the input elements in cells change in value. I've already created custom sorters for my data, which works wonderfully, but now I need to re-sort when data changes.

$('#id').tablesorter(...) almost does what I need, but it seems to apply ANOTHER set of sorting on a given table, which leads to really weird behavior. Is there a way to completely redo the tablesorting action, or at least for the table to resort based on new information?

From building the custom parser, I see that tablesorter builds the formatted columns and stores it internally once when the page loads, and I need to modify this behavior such that I can resort on $('#id input').change.

Any ideas? The documentation for this plugin is weak, although it is a great plugin.

+1  A: 

Are you referring to:

$("#id").trigger("update");
Marc
+1  A: 

i think what you need to do is trigger an update.

$("#tableId").trigger("update");

that's what i'm doing to make my tables resort.

i agree with you the documentation for this plugin is weak as best.

Patricia
At least the source code is clean enough :P. I'll try these methods out in a bit.
Stefan Kendall
yup, it's pretty nice looking code, i think that is how i found this.
Patricia