On Sep 1, 9:00 am, swaroop <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>   Currently i am working on tablesorter plugin with jqery to sort
> column values in a table. My problem is when there is mixed data in a
> column like some numbers and "-" (when there is no data to display)
> its sorting the digits treating as string. e.g. in a column if the
> values are 7, 12, 9, 15, - then it treats 9 as a highest value. When i
> sort it it arranges like 9,7,15, 12, -.
>
> Thanks,
> Swaroop

Hi, could you force the column values to be considered as numbers by
specifying it in options to tablesorter (sort 1st and 3rd columns as
numbers):
var params = {
headers: {1:{sorter:"digit"}, 3:{sorter:"digit"}}
};

-Cursed

Reply via email to