[DynamicTable] How to catch event when click on cell?

Forge Component
(12)
Published on 2018-06-22 by Carlos Alfradique
12 votes
Published on 2018-06-22 by Carlos Alfradique

Hi all,

Please give me the way to catch event when click on cell.

Thank you very much.

Duc Nguyen wrote:

Hi all,

Please give me the way to catch event when click on cell.

Thank you very much.

Hi there Duc.

Can you to explain better your problem please?
You would like the number of column and row? Is this?

Regards,
Carlos Alfradique


Carlos Alfradique wrote:

Duc Nguyen wrote:

Hi all,

Please give me the way to catch event when click on cell.

Thank you very much.

Hi there Duc.

Can you to explain better your problem please?
You would like the number of column and row? Is this?

Regards,
Carlos Alfradique


Hi Carlos,

I have a table as below

When click on cell, i want to show the number of column and row in the popup window.

Please give me the way to solve it.

Thank you very much.

var row = $(this).closest("tr");

var rowIdx = $("tr", $('table')[0].tbody).index(row);

var colIdx = $("td", row).index(this);

Tong Liu wrote:

var row = $(this).closest("tr");

var rowIdx = $("tr", $('table')[0].tbody).index(row);

var colIdx = $("td", row).index(this);

Hi Tong Liu,

Thanks for your advice. I will try it.

@Carlos: Do you have other idea for this?