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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:38:03+00:00 2026-06-18T07:38:03+00:00

I am creating a dataTable with filters where the filters can be displayed/hidden using

  • 0

I am creating a dataTable with filters where the filters can be displayed/hidden using a selectBooleanButton. I am able to hide the text filters, but the select box for ‘exact’ filter does not hide. Code is given below. I would appreciate any help.

<p:dataTable id="orgs" var="id" widgetVar="idTable"
value="#{orgList.ids}" rows="10"
rowKey="#{id.idPk}"
paginator="true" paginatorPosition="top" 
selectionMode="single" 
selection="#{orgList.selectedOrg}"
filteredValue="#{orgList.filteredValues}"
>

<f:facet name="header">
    <p:toolbar id="orgListToolbar">
        <p:toolbarGroup align="right">
            <p:selectBooleanButton value="#{orgList.showFilter}" onIcon="myfilter" offIcon="ui-icon-minusthick" onLabel="F" offLabel="F">
                <p:ajax update="orgs" oncomplete="idTable.clearFilters()"/>
            </p:selectBooleanButton>
        </p:toolbarGroup>
    </p:toolbar>
</f:facet>


<p:column sortBy="#{id.id}" headerText="Id" filterBy="#{id.id}" filterStyle="#{orgList.showFilter?'':'display: none; visibility: hidden;'}">
    <h:outputText value="#{id.id}" />
</p:column>
<p:column sortBy="#{id.idCls.clsName}" headerText="Id Type"             
        filterBy="#{id.idCls.clsName}" filterMatchMode="exact" filterOptions="#{commonLists.selectItemIdClses}" 
        filterStyle="#{orgList.showFilter?'':'display: none; visibility: hidden;'}" >
    <h:outputText value="#{id.idCls.clsName}" />
</p:column>

  • 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-18T07:38:04+00:00Added an answer on June 18, 2026 at 7:38 am

    That’s because Primefaces overrides your filterStyle

    You can do the following :

    In your custom css file add the following (id is your table id)

    #id .ui-column-filter{
     display:none;
    }
    

    make sure you include your css in the end… (You can load the css in the body) like this

    <h:body>
        <h:outputStylesheet library="css" name="myCssFile.css" target="head" />
    

    Note that display: none; is enough , no need for the visibility: hidden; at all


    In order to hide / show the filters you can use jQuery .hide() / .show() functions with the proper selectos

    For example :

    $("#form\\:dataTable th select").hide();//.show
    
    $("#form\\:dataTable th input").hide();//.show
    

    Check it in DataTable – Filtering (in console of your browser developer tools)

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

Sidebar

Related Questions

In runtime I'm creating a DataTable and using nested for-loops to populate the table.
How can I load a CSV file into a System.Data.DataTable , creating the datatable
I have a DataTable that I'm creating an XML file from using .WriteXML(..), although
I know how to fill a datatable with dAdapter.Fill(dTable) using System.Data.OleDb But it's heavy
I'm creating a large XLSX file from a datatable, using the SAX method proposed
I am using a jQuery DataTable on a site, but all the data in
In C#, I'm creating an XML file from a DataTable using dataTable.WriteXml(filePath), and get
I am creating a dataTable and then linking it to GridView on my ASP.NET
I have a gridview I am populating it by creating a datatable filling that
c#/oop noob here. I am creating a datatable from the schema of a sql

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.