Solved

Hide Table Column through Jquery

Posted on 2010-11-24
4
953 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

775 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