Ok, I have a table, made by a GridView, and attached a tablesorter to it, it works just fine.
Then I put it inside an updatepanel, and added the code to rebind it on a postback, here is my script:
function loadEvents() { $("table[id$='gv']").tablesorter(); }
$(document).ready(function() { loadEvents(); });
function reBind() {
if (Sys.WebForms.PageRequestManager) {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function() { loadEvents(); });
}
}
Which works great, I load the gridview, sorting works.
- I click a button that posts back, it works fine.
- I click again and the first click works to sort, sorting it up, but it gets stuck - there - I can change columns, but it will never sort down? But then...
- I click again, and it works fine
This continues on, working every-other click... any ideas?