Get "real" column (row) when I click on a spanned column (row)

Tags: #<Tag:0x00007efc60e6fa88> #<Tag:0x00007efc60e6f948>

Hi,
when columns A and B are spanned, is there a way to get the real column number header depending on the location of the click ?
If the click is made under the column A I want to get 0 and 1 if made under the column B

Regards.
Philippe

Hi @philippe.loyer

I’m not sure what do you mean by spanned columns. Do you mean column groups like in this example? https://jsfiddle.net/handsoncode/f6g3qhr0/

Hi Adrian,
yes sorry my explanation was not clear.

image

Here is my example. When I click on European Market (which is a merged cell), i would like to know if the click has occured under column C or column D. I can get the row and col of the cell of course but this is always (0,2).

Philippe

@philippe.loyer

Thank you for the clarification. Such action isn’t possible in Handsontable, as getting the coordinates of the merged area will return only initial coordinates.

For example, in the picture you sent, for “European Market” we will have coordinates of row: 0 col: 2. You can see how it works in this example: https://jsfiddle.net/handsoncode/9prqh81a/

ok understood. I’ll find an other way.
Thank you Adrian.