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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:01:49+00:00 2026-05-27T09:01:49+00:00

I current have a datatable that has a button for each record that when

  • 0

I current have a datatable that has a button for each record that when clicked displays other information for that account. When this happens, I call fnFilter() to filter that specific row so that no other ones are displayed and the user knows that the sub-information I display is for that specific account.
What I would like to do, is when a user clicks back in the search toolbar, it hides the sub-information I displayed, then clears the filter and shows all the original records available.
Everything works fine, except that the filter doesnt get cleared so only the originally selected row is still displayed.

Not sure what I am missing. I have tried everything from using fnFilter(”), to fnDraw(), to fnReloadAjax(). None of these (or any combination) seem to work!

UPDATE I seemed to have isolated the problem. If I remove the column # from the fnFilter(accountid,7), using fnFilter(”) does re-display all records. However, I really need to filter by that specific column as it is the only column that contains unique values for each record. Any ideas? I did try using fnFilter(”,null) but no success.

Here is my code:

var oTable = $('.mypbhs_accounts').dataTable({
        "bProcessing": true,
        "sAjaxSource": 'sql/mypbhs_accounts.php',      
        "aaSorting": [[1, "asc" ]],
        "bJQueryUI": true,
        "sPaginationType": "full_numbers",
        //"bStateSave": true, //Use a cookie to save current display of items
        "aoColumns": [
            {"asSorting": [  ], "sClass":"center"},
            null,
            null,
            null,
            null,
            null,
            null,
            { "bSearchable": true, "bVisible": false },       
            { "bSearchable": true, "bVisible": false }       
        ],
        "bScrollCollapse": true,
        "sScrollX": "100%",
         "fnInitComplete": function() {
                oTable.fnAdjustColumnSizing();
         }
    });
/*** CLEAR CURRENT ACCOUNT INFO ***/
$(document).on('click','.mypbhs_content .dataTables_filter',function(){ //THIS IS CALLED WHEN USER CLICKS INTO THE SEARCH BAR
    $('.mypbhs_content .dataTables_filter :input').val(''); //CLEAR CURRENT VALUE IN THE SEARCH BAR
    oTable.fnFilter('');
    //oTable.fnDraw();
    //oTable.fnReloadAjax();
    $('.mypbhs_truform_info').empty(); //REMOVE SUB-INFORMATION SO IT DOESNT GET ASSOCIATED WITH WRONG ACCOUNT
    $('.control_bar').children('ul.mypbhs_account_controls').empty();
});
  • 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-27T09:01:49+00:00Added an answer on May 27, 2026 at 9:01 am

    Ah I seemed to have figured it out.
    Have to clear out the filter on that specific column AND the global filter:

    oTable.fnFilter('',7);
    oTable.fnFilter('');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the current basic structure for each domain object that I need to
If you have a DataTable that has a column of some Enum type. And
I have the following datatable, which has Units information. The Units have a surface
I have three current thoughts on how to do this: re-implement AuthenticationService, which uses
At my current job we have a CMS system that is .NET/SQL Server based.
I have a DataTable in memory that I need to dump straight into a
I have a function that converts a .csv file to a datatable. One of
So I have an awful query that current exists in MS Access that I
I have an existing application that uses Active Record for its data retrieval. It's
I have a DataSet with a DataTable that correctly fills a single DataRow through

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.