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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:11:58+00:00 2026-06-03T03:11:58+00:00

I have multiple column headers that spans of multiple column and I would like

  • 0

I have multiple column headers that spans of multiple column and I would like to find the correct header number/count for the columns. Also some of the table data have rowspan and colspan.

I want to be able to click any cell or table data and get its left and top headers.

  1. So if I click the with “D9:LH1-TH4(H4a)” I should get:

    • Left Header is: LH1, Top Header1 is TH4 and Top Header 2 is H4a
  2. And if I click the with “D3:LH2-TH2(H2b-H4a)” I should get:

    • Left Header is LH2, Top Header 1 is TH2 and Top Header 2 is H2b

Example:

<table width="200" border="1" style="background-color:#000; color:#FFF">
  <tr>
    <th scope="col">&nbsp;</th>
    <th colspan="2" scope="col"> TH1 </th>
    <th colspan="4" scope="col"> TH2 </th>
    <th colspan="6" scope="col"> TH4 </th>
  </tr>
    <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col"> H1a </th>
    <th scope="col">H1b</th>
    <th scope="col"> H2a</th>
    <th scope="col">H2b</th>
    <th scope="col">H2c</th>
    <th scope="col">H2d</th>
    <th colspan="6" scope="col"> H4a </th>
  </tr>
  <tr>
    <th rowspan="3" scope="row"><span>LH1</span></th>
    <td colspan="2" rowspan="3">D1:LH1-TH1(H1a-H1b)</td>
    <td colspan="3" rowspan="2">D2:LH1-TH2(H2a-H2c)</td>
    <td rowspan="3">D5:LH1-TH2(H2d)</td>
    <td rowspan="3">D6:LH1-TH4(H2a-H2c)</td>
    <td colspan="2">D7:LH1-TH4(H4a)</td>
    <td>D8:LH1-TH4(H4a)</td>
    <td rowspan="3">D13:LH1-TH4(H4a)</td>
    <td rowspan="3">D14:LH1-TH4(H4a)</td>
  </tr>
  <tr>
    <td colspan="3">D9:LH1-TH4(H4a)</td>
  </tr>
  <tr>
    <td colspan="2">D3:LH1-TH2(H2a-H2b)</td>
    <td>D4:LH1-TH2(H2c)</td>
    <td>D10:LH1-TH4(H4a)</td>
    <td>D11:LH1-TH4(H4a)</td>
    <td>D12:LH11-TH4(H4a)</td>
  </tr>
  <tr>
    <th scope="row"><span>LH2</span></th>
    <td colspan="2" >D1:LH2-TH1(H1a-H1b)</td>
    <td colspan="3">D2:LH2-TH2(H2a-H2c)</td>
    <td colspan="5">D3:LH2-TH2(H2b-H4a)</td>
    <td>D4:LH2-TH4(H4a)</td>
    <td>D5:LH2-TH4(H4a)</td>
  </tr>
</table>​

Please see this link

  • 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-03T03:11:59+00:00Added an answer on June 3, 2026 at 3:11 am

    That was annoyingly tricky.
    you can find your headers by using the parent offsets.

    got it working in this fiddle
    http://jsfiddle.net/work4liberty/fk6sy/14/

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

Sidebar

Related Questions

I have multiple column headers that spans of multiple column and I would like
I have an XML valued column that has multiple parent nodes. I need to
I want to display a UITableView with Multiple Columns. The first column will have
I have CSV files that have multiple columns that are sorted. For instance, I
I have a gridview ...with multiple columns. If I click on one column, it
Users are wanting a grid to have multiple lines in the column header, and
Here's a scenario... I have a column. In the column i have multiple divs
Can I have an identity (unique, non-repeating) column span multiple tables? For example, let's
I have table with date/time column and person column. Each person has multiple records
I have a table with a Date column. Each Date may appear multiple times.

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.