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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:11:52+00:00 2026-06-17T10:11:52+00:00

I need to hide a column from showing up in jquery datatables. When I

  • 0

I need to hide a column from showing up in jquery datatables.
When I hide the column using bVisible property it disappears from the DOM.

I want to set display property of table cells of a column to none so that the values do not appear in the view but they should still be present in the DOM as the column I am hiding identifies the row uniquely and I need to know the unique ID on row select. How to achieve this.

I am populating the table using aaData property using server side pagination.

Had a look at this question but these options remove it from the DOM.
jquery datatables hide 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-17T10:11:54+00:00Added an answer on June 17, 2026 at 10:11 am

    You should use className along with the columnDefs or the columns,

    Define hide_column class in your css like this

    .hide_column {
        display : none;
    }
    

    You have two ways to assign that .hide_column class:

    Use columnDefs (assign custom class to first column):

    $('#example').DataTable( {
      columnDefs: [
        { targets: [ 0 ],
          className: "hide_column"
        }
      ]
    } );
    

    OR columns

    $('#example').DataTable( {
      "columns": [
        { className: "hide_column" },
        null,
        null,
        null,
        null
      ]
    } );
    

    code snippets taken from here


    Old answer

    Try adding

    "sClass": "hide_column"
    

    that should make that column hidden…

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

Sidebar

Related Questions

I read an article of how to hide a column using JQuery. That has
I want to filter a table using jQuery hide/show based on what the user
There are 3 cells in a tableview. I need to hide and display the
I need to show a form using a button, and hide it when the
I need to hide an excel column entirely. I used the below code but
I'm using DataGrid control and I need to hide it. I've tried to use
I have a table and I want to hide a column when I double
I'm using jQuery to hide/show content and it works, but not the way I
In different data types I need to hide some columns (not one) from grid.
I need to hide content of a column based on comparing its data with

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.