views:

27

answers:

1

Hello ,

i have this modified tablesorter and pager installed at : tourscript.com/jqueryasp/room_numbers.asp you could see both sorting and pager mess out ... I have the same version of this but without pager located at http://tourscript.com/jqueryasp/room_numbers2.asp# in the second version the sort work fine .. Does anybody know a way to add correct the pager plugin in my case .. i tried a lot of combination with no success .. I mention I'm beginner in Jquery ,

thank you

A: 

Ok, this is your issue.

This code looks very similar to a tutorial I wrote once on inline editing with the tablesorter plugin. Not sure if that's where you grabbed your initial code from.

In your table it looks like you have 7 rows when just looking at it at face value. But actually you have 14 rows. 1 row for each visible row and an extra row for each line to accommodate the inline editing. The pager plugin limits the visible rows to a predefined value which in the base case is 10 rows.

So when you click on your sort headers the pager responds by cutting the number of rows down to 10. (Don't ask me why it doesn't do a cut down in the beginning, I can't remember). The pager doesn't care whether these are hidden or not, because it just doesn't work that way (simplicity by design).

So when it appears that you only have 4 rows, it's actually 4 visible + 6 invisible rows (you can use something like Firebug to confirm this).

So you have a few options to solve your problem:

  1. You were not aware or don't want the inline editing, in this case just remove all of the tr sections that are like this: tr class="editline" style="display:none;"
  2. You do want inline editing as well as tablesorter as well as pager. In this case you are setting a precedent and you are on your own.
xiaohouzi79