开发者

Get parent index of rich:subTable

开发者 https://www.devze.com 2023-03-21 01:25 出处:网络
In my application I use a rich:subTable inside a rich:dataTable. I want to get the index of the rich:开发者_开发知识库subTable inside the rich:dataTable when I click on a row of the rich:subTable. Is

In my application I use a rich:subTable inside a rich:dataTable. I want to get the index of the rich:开发者_开发知识库subTable inside the rich:dataTable when I click on a row of the rich:subTable. Is there any way to achieve this?


you can use jquery to get to the datatable row and then find the row index, something like this

var rowIndex = $(this).closest('tr').prevAll().length;

or

var row = $(this).parent().parent(); var rowIndex = $(row[0].rowIndex);


I have used the another approach that means using HtmlSubTable class of the subtable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号