Question

I'm using jquery tablesorter lib from tablesorter.com. I've a table with multiple columns with thead and tbody. I have column 5 and 6 disabled from sorting. All the other columns sort properly but column 7. I can't seem to make column 7 sort at all. Here's my Plunker example.

http://embed.plnkr.co/BiAvoUxFd5Q9rtz46XOt/preview

Was it helpful?

Solution

The version of tablesorter you are using is v2.0.1, so it's not even the latest version from tablesorter.com.

Also, thank you for enabling the debug code. It appears that "Col 7" (column 6 in the debug) is being set to use the "integer" parser, so when you sort it is sorting, but not using the correct values. It appears that v2.0.5 that is from tablesorter.com has fixed this issue (demo).

$(function () {
    $("#table").tablesorter({
        widthFixed: true,
        headers: {
            4: { sorter : false },
            5: { sorter : false },
            7: { sorter : false },
            8: { sorter : false },
            9: { sorter : false },
            10: { sorter : false },
            11: { sorter : false }
        }
    });
});

Might I also suggest that you try out my fork of tablesorter which has many other improvements and enhancements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top