Solved

Hide Table Column through Jquery

Posted on 2010-11-24
4
951 Views
Last Modified: 2012-08-14
Hi

I am trying to hide a column in an application Developed using Oracle Apex.

HTML of table is generated by Apex so I cannot change that. The table column starts with

<td headers="COL19" class="t9data">
......
.....
</td>


I tried following but it did not work
  $('td headers="COL19"').hide();


Please help

0
Comment
Question by:systemsautomation
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 34205691
$('td[headers="COL19"]').hide();
0
 
LVL 14

Expert Comment

by:sam2912
ID: 34206745
You could try something like this to remove all cells under the same table header:
var colHeader = $('td[headers="COL19"]');
var table = colHeader.parents("table");

table.find("tr").each(function() {
$(this).find("td")[colHeader.index()].remove();
});

Open in new window

0
 

Author Comment

by:systemsautomation
ID: 34210689
i want to hide a specific cell in the table.
How can i find the specific cell and how can i hide it?
0
 
LVL 14

Accepted Solution

by:
sam2912 earned 500 total points
ID: 34210750
How is the specific cell specified? You could do something like this:
var cell_rowNumber = 3;

var cell_colNumber = 5;



var table = colHeader.parents("table");



table.find("tr:gt(cell_rowNumber)").find("td")[cell_colNumber].remove();

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now