[jQuery] Re: tableSorter - problems with changing the number of rows

2007-07-05 Thread Christian Bach


.trigger("resort");

/christian

2007/7/5, Phil Glatz <[EMAIL PROTECTED]>:


On Jul 5, 4:22 am, "Christian Bach" <[EMAIL PROTECTED]>
wrote:
> set useCache: false
>
> then trigger this after the update.
>
>  $('#bodytable').trigger("updateColumnData");

Thanks, Christian; that did the trick.

When I rebuild the table with more rows, sorting isn't working. If I
was sorting on a particular column, the new column contents don't
always come out in sorted order. Is there another trigger to force a
sort update?

Thanks again, Phil





--
POLYESTER*
Wittstocksgatan 2
115 24 Stockholm
Phone: 08-660 73 50 / +46-8-660 73 50
Mobile: 070-443 91 90 / +46-70-443 91 90
E-mail: [EMAIL PROTECTED]
http://www.polyester.se


[jQuery] Re: tableSorter - problems with changing the number of rows

2007-07-05 Thread Phil Glatz

On Jul 5, 4:22 am, "Christian Bach" <[EMAIL PROTECTED]>
wrote:
> set useCache: false
>
> then trigger this after the update.
>
>  $('#bodytable').trigger("updateColumnData");

Thanks, Christian; that did the trick.

When I rebuild the table with more rows, sorting isn't working. If I
was sorting on a particular column, the new column contents don't
always come out in sorted order. Is there another trigger to force a
sort update?

Thanks again, Phil



[jQuery] Re: tableSorter - problems with changing the number of rows

2007-07-05 Thread Kia Niskavaara



Christian Bach wrote:
> Hi Phil,
> And to leak a new feature: it will contain multiple column sorting.
> 
> Best regards
> Christian

I'm looking forward to this new feature!! Thanks!


[jQuery] Re: tableSorter - problems with changing the number of rows

2007-07-05 Thread Christian Bach

Hi Phil,

set useCache: false

then trigger this after the update.

$('#bodytable').trigger("updateColumnData");


I'm addressing this issue in the new 2.0 version of tablesorter supplying a
simple .update() method that will rebuild the cached table.

And to leak a new feature: it will contain multiple column sorting.

Best regards
Christian

2007/7/5, Phil Glatz <[EMAIL PROTECTED]>:



I'm using the tableSorter plugin and am having a problem with the
number of rows displayed; I hope I can describe the situation clearly.

I'm building my table dynamically from a local javascript array,
initially populated with a database query. Next, I call the
tableSorter function. So far so good.

Next, I click a button to apply a filter. I clear out my table body's
contents with
  $('#bodytable > tbody').empty();

I fill it up again by looping through my data, but this time skipping
certain rows, ending up with a smaller table. When I click on a column
head to redisplay, it thinks I had the number of rows that were
originally in the table, and doesn't sort correctly. It I have a
filter on when I load the page and end up with 5 rows, then remove the
filter and repopulate the table with ten rows, they all get displayed.
But when I click to sort, only 5 rows are displayed.

I want to avoid having to refresh the page, and am hoping there is
something I can do to tell tableSorter to recalculate the table size
after I have repopulated the table.

I tried setting useCache to false, but that didn't help. I've tried
calling $("#bodytable").tableSorter() again, hoping it would reset
everything, but that didn't help either. Is there a way to force it to
do a recalc?

Thanks for your help, this is a great group.





--
POLYESTER*
Wittstocksgatan 2
115 24 Stockholm
Phone: 08-660 73 50 / +46-8-660 73 50
Mobile: 070-443 91 90 / +46-70-443 91 90
E-mail: [EMAIL PROTECTED]
http://www.polyester.se