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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:24:03+00:00 2026-05-31T04:24:03+00:00

The datatable I’m creating has a Sex column. Here is the filter.. columnFilter({ aoColumns:

  • 0

The datatable I’m creating has a “Sex” column. Here is the filter..

columnFilter({
    aoColumns: [ { type: "select", values: [ 'Male', 'Female' ]  },
                 { type: "text" },  
                 { type: "number" },    
                 { type: "number" }]
});

The problem is that the word “male” is in the word “Female” so when I select the “Male” filter it shows all. Is there a way to have this select exact match or even at least case sensitive?

  • 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-31T04:24:04+00:00Added an answer on May 31, 2026 at 4:24 am

    The Columnfilter plugin uses the datatables API function fnFilter to do its individual searches. According to the author’s documentation (the little there is) he seem to have forgotten the case sensitive parameter in the fnFilter function(search for fnFilter), and the plugin doesn’t give much leeway for the filter settings.

    There are a few alternatives.

    You could design your own filtering plugin, utilizing the fnFilter function, now that you know that it’s there.

    You can do some ad-hoc solutions, like in this example. Note that this is a very lazy example, but it shows how the plugin basically works.

    If you’re up for it, you can alter the filtering in the plugin code. This is what I recommend, because it’s an easy fix.
    Adding/changing these lines in datatables.columnFilter.js should be enough

    //Line 563
    ...
    var defaults = {
        sPlaceHolder: "foot",
        sRangeSeparator: "~",
        iFilteringDelay: 500,
        aoColumns: null,
        sRangeFormat: "From {from} to {to}",
        bCaseSensitive: true //add this
    };
    
    properties = $.extend(defaults, options);
    
    //Line 357
    ...
    function fnCreateSelect(oTable, aData, bRegex, bCaseSensitive) { //add parameter
        var oSettings = oTable.fnSettings();
        if (aData == null && oSettings.sAjaxSource != "" && !oSettings.oFeatures.bServerSide) {
            oSettings.aoDrawCallback.push({
                "fn": (function (iColumn, nTh, sLabel) {
                    return function () {
                        if (oSettings.iDraw == 2 && oSettings.sAjaxSource != null && oSettings.sAjaxSource != "" && !oSettings.oFeatures.bServerSide) {
                            //add parameter
                            return fnCreateColumnSelect(oTable, null, _fnColumnIndex(iColumn), nTh, sLabel, bRegex, true, true, !bCaseSensitive);
                        }
                    };
                })(i, th, label),
                "sName": "column_filter_" + i
            });
        }
        //add parameter
        fnCreateColumnSelect(oTable, aData, _fnColumnIndex(i), th, label, bRegex, true, true, !bCaseSensitive);
    }
    
    //Line 311
    ...
    function fnCreateColumnSelect(oTable, aData, iColumn, nTh, sLabel, bRegex, bCaseSensitive) { //add this
    
        //...
    
        select.change(function () {
    
            //...
    
            if (bRegex)
                //add parameter
                oTable.fnFilter($(this).val(), iColumn, bRegex, true, true, !bCaseSensitive);
            else
                //add parameter
                oTable.fnFilter(unescape($(this).val()), iColumn, false, true, true, !bCaseSensitive);
            fnOnFiltered();
        });
    }
    

    Those .fnFilters should be enough to get what you want. There are plenty more in there, so if you want to add it on the others as well, just do the same thing.

    All I did was add a default parameter called bCaseSensitive that you can now enter in the options and then added the same parameter to the functions that created the events and of course, added it to the .fnFilter function itself.

    Best of luck!

    If you can’t get it to work, I’ll see if I can upload the altered plugin somewhere for you to download from.

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

Sidebar

Related Questions

I have a DataTable that has a boolean column called [Invalid]. I need to
I have a DataTable which has a column amount for each rows and I'd
my DataTable has over 1000 columns and I want to display values on the
Primefaces Datatable let you configure the filtering type you use for a column, using
I have a DataTable which has the following structure. StartDate (Type DateTime) EndDate (Type
I loaded a custom DataTable into an UltraChart of type GanttChart . The data
I have a DataTable with a Name column. I want to generate a collection
I'm binding a datatable to a gridview control, and when I format each column
Datatable filter is not able apply for Datatable which is stored in session. Can
my datatable; dtData ID | ID2 -------- 1 | 2 1 | 3 dtData.Select(ID

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.