116
Views
4
Comments
[DynamicTable] How to catch event when click on cell?
Question
dynamictable
Web icon
Forge asset by Bart van Dijk

Hi all,

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

Thank you very much.

2021-07-19 14-21-08
Carlos Alfradique

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


2018-09-21 04-06-27
Nguyen Thanh Duc

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.

UserImage.jpg
Tong Liu

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

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

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

2018-09-21 04-06-27
Nguyen Thanh Duc

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.