[DynamicTable] How to catch event when click on cell?
Question
dynamictable
Web icon
Forge component by Bart van Dijk

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? 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.