• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

Show the row for each of the dept name but only show the first column header row.

Hi, I have a repeating header in my report which repeats one row for the dept name, then the next row shows all the column names (th)
I want to show the row for each of the dept name but only show the first column header row.

This gets me all the header rows - but how do I not include the first row?
$('th#FIRST_NAME').parent()

thx, Bill
0
bcarlis
Asked:
bcarlis
  • 2
1 Solution
 
bcarlisAuthor Commented:
I got it with this:

$('th#FIRST_NAME').parent().hide();
$('th#FIRST_NAME').parent().filter(":first").show();

but can I use straight css? or is there a better way to do it?

Oracle APEX creates the initial report so I don't think I can do it on rendering.

thx, Bill
0
 
Chris StanyonCommented:
You can use the not() method with the eq selector:

$('th#first_name').parent().not(':eq(0)').hide();

Open in new window

This will select each parent of th#first_name and hide all but the first one - eq() takes a zero-based index - 0=1st, 1=2nd etc

You may have a problem because it looks like you have several elements using the same ID. IDs are suppsoed to be unique across your page. If you want to do it with CSS, you could use the jQuery selector to add a class, set to display: none

$('th#first_name').parent().not(':eq(0)').addClass('hidden');

Open in new window

//CSS
.hidden { display:none; }
0
 
bcarlisAuthor Commented:
Hi Chris, Just saw you answered this.. I like yours better! Thx again!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now