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 7812669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:35:17+00:00 2026-06-02T04:35:17+00:00

I think I know the issue with this, but I do not know how

  • 0

I think I know the issue with this, but I do not know how to approach it properly so I am hoping someone here has had a similar issue and managed to fix it some how. What I have is a table with a few columns all of which work as far as sorting goes except one. below is a screen capture of that column and its sorting at work.

enter image description here

as you can see it does not sort according to alpha-numeric logic. My assumption is that some of the names have characters in them such as comma’s parentheses, brackets, and so on. So that said, how would I tackle this issue so I can sort this alpha-numericly using the datatables plugin? Idea’s?

****EDIT****

This is the code I am working with, works for everything but this one column..

jQuery.fn.dataTableExt.oSort['num-asc']  = function(a,b) {
    var x = a.replace( /<.*?>/g, "" );
    var y = b.replace( /<.*?>/g, "" );
    x = parseFloat( x );
    y = parseFloat( y );
    return ((x < y) ? -1 : ((x > y) ?  1 : 0));
};

jQuery.fn.dataTableExt.oSort['num-desc'] = function(a,b) {
    var x = a.replace( /<.*?>/g, "" );
    var y = b.replace( /<.*?>/g, "" );
    x = parseFloat( x );
    y = parseFloat( y );
    return ((x < y) ?  1 : ((x > y) ? -1 : 0));
};

$(document).ready(function() {
    $('#ledger').dataTable({
        bAutoWidth: false,
        bJQueryUI : true,
        bProcessing: true,
        bServerSide: false,
        sPaginationType: "full_numbers",
        bStateSave : false,
        bUseRendered: false,
        iDisplayLength: ${entriesValue},
        sDom: mw.superadmin.datatable.relatedListDom,
        aLengthMenu: mw.superadmin.datatable.relatedListLengthMenu,
        aaSorting: [[0,'asc']],
        aoColumns: [
            null,
            { "iDataSort": 2},
            { "bVisible": false, "sType": "num"},
            { "iDataSort": 4, "bSortable": true },
            { "bVisible": false, "sType": "num"}
        ]
    });
  • 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-02T04:35:19+00:00Added an answer on June 2, 2026 at 4:35 am

    Since you’re showing a link, I’m guessing you’re using a custom render function?

    If that’s the case, in your column definition set the following:

    "bUseRendered": false
    

    That’ll make the table sort on the data, and not the rendered output.

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

Sidebar

Related Questions

I know this looks similar to other questions here but I don't think my
I think know how to do this in C# but I'm having syntax trouble
Well I think I know the answer to this, but I would appreciate anybody
Still learning Objective-C / iPhone SDK here. I think I know why this wasn't
I think I already know the answer to this but thought I would ask
I think i already know the answer to this, but i cannot find anything
i have this issue working but i would like to know if there is
First, I am using Wordpress for this project but I don't think this issue
I think I know what a B-tree is but what is a B-tree page?
I've been doing some research and I think I know the answer already, but

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.