Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7527681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:09:56+00:00 2026-05-30T04:09:56+00:00

I have a table with a column with numbers spanning approximately -10 to 10

  • 0

I have a table with a column with numbers spanning approximately -10 to 10 and some empty columns.

I’d like tablesorter to always put the empty columns at the bottom of the table. Even if I sort ascending or descending.

Like this:

-1
0
2
3
<empty cell>
<empty cell>

or like this:

3
2
0
-1
<empty cell>
<empty cell>

Note that my problem is the same as question 4792426 except that I want empty cells on the bottom both when sorting order is descending and ascending.

Deleting rows is not an option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:09:57+00:00Added an answer on May 30, 2026 at 4:09 am

    I found a way to solve my problem.

    The solution provided by ssell did not work. The table data is parsed only once, so you cannot use a global variable to control it. Nice try though! 🙂

    This is the code needed. As you see I overload the formatFloat and formatInt functions so that they return null instead of the default value: 0. The sorting function inside tablesorter does the rest magically for me.

            $(document).ready(function () {
            $.tablesorter.formatInt = function (s) {
                var i = parseInt(s);
                return (isNaN(i)) ? null : i;
            };
            $.tablesorter.formatFloat = function (s) {
                var i = parseFloat(s);
                return (isNaN(i)) ? null : i;
            };
            $("#table").tablesorter();
        });
    

    As far as I know my solution is undocumented, but it works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table with an integer column with some fairly large numbers in
I have a table with a SortID column that is numbered using consecutive numbers.
I have table in the database with a phone number column. The numbers look
I have a table with some 30 columns, already used in the application extensively.
I would like to rename a large number of columns (column headers) to have
In a table column in string we can have numbers/special chars/white spaces. I want
Suppose we have a table of numbers like this (we can assume it is
Here i have table test having column id with datatype nvarchar contains values like
I have a table with a varchar column that is entirely populated by numbers.
I have a table with a smallint column that contains percentages as whole numbers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.