Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
How to hide specific HTML table column?

I have a dynamically made HTML table. I want to hide one of the columns with style.visibility = "hidden"

The cell i want to hide is provided with the needed ID, but when i do this my whole table disappears.

// get element ID & set to hidden
document.getElementById('wachtwoord')!.style.visibility = 'hidden'

// set ID of the cell & append to DOM
 Object.values(userData).forEach((userDataElement, columnIndex) => {
      // create element and textnode      
      let cell: HTMLTableDataCellElement = document.createElement("td");
      let textNode: Text = document.createTextNode(userDataElement as string);

      // append to DOM   
      cell.appendChild(textNode);
      row.appendChild(cell);
      table.appendChild(row);
      createTable!.appendChild(table);

      row.id = userData.id

      if (columnIndex === 3) {
        cell.id = "wachtwoord"
      };



How can i hide a specific table cell?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!