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

  • Home
  • SEARCH
  • 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 7933159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:14:36+00:00 2026-06-03T21:14:36+00:00

In my web application I have maintain table for the user records. Records are

  • 0

In my web application I have maintain table for the user records. Records are added and deleted on client send and than user clicks on save button to save all the manipulations done on the server.

I have applied table sorter for the sorting functionality on the table. But surprisingly sorted functionality is working fine for only ID field ie the first field of table, but for all other fields, it is giving error (error trace from chrome)

Uncaught TypeError: Cannot read property 'type' of undefined
multisortjquery.tablesorter.js:600
$.extend.tablesorter.construct.each.$headers.click.mousedown.onselectstart 

Here is the table structure.

<table id="contentTable" class="tablesorter">
                        <thead>
                            <tr>
                                <th> ID </th>
                                <th> Name </th>
                                <th> Birth Date </th>
                                <th> City </th>
                                <th id="actionheader"> Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td></td>
                            </tr>
                        </tbody>
                    </table>

In this I add data dynamically. In this situation sorting is working fine for only first field ie ID field

This is how I initialized the tableSorting.

  function initializeTableSorting() {
        $("#contentTable").tablesorter({
            sortList : [[0, 0]],
            headers : {
                0 : {
                    sorter : "integer"
                },
                1 : {
                    sorter : "text"
                },
                2 : {
                    sorter : false
                },
                3 : {
                    sorter : "text"
                },
                4 : {
                    sorter : false
                }
            }
        });
    }

How can I make this work for all fields, even also for date field if I remove the false option from the initialization ?

  • 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-06-03T21:14:38+00:00Added an answer on June 3, 2026 at 9:14 pm

    I can’t duplicate the reported error, but if I follow the programming logic…

    The error you are describing occurs on this line of code:

    var s = (table.config.parsers[c].type == "text") ...
    

    Which means that parsers[c] doesn’t exist. The variable c is just the column index.

    So, if I had to guess, I’d say there is a custom parser involved but it doesn’t have a type attribute defined.

    // default text parser
    ts.addParser({
        id: "text",
        is: function (s) {
            return true;
        },
        format: function (s) {
            return $.trim(s.toLocaleLowerCase());
        },
        type: "text"
    });
    

    Or, it could be a problem with the definition of the sortList. Make sure the correct number of square brackets are around the variables:

    var sorting = [[0, 0]];
    $("#contentTable").trigger("sorton", [sorting]);
    

    or in compressed form:

    // more than one column -> [[ [0,0], [1,0] ]]
    $("#contentTable").trigger("sorton", [[[0, 0]]]);
    

    Try out this demo

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

Sidebar

Related Questions

In my web application i have registration form, when user register i want to
in my web application I have a button when I click I want to
I am working on a web application by using ASP.NET C#. I have maintain
I have a small web site where I maintain user data, and I maintain
I have one question; In my ASP.NET MVC web application have to do certain
In my web application I have taken a ajax calendar in that i want
In my web application we have many users.I want to set permission for each
In my web application users have the ability to upload games which are then
I am building a web application and have been told that using object oriented
I have started a new web application and have decided to use jquery as

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.