Get the DT_RowId when I click on a cell

Get the DT_RowId when I click on a cell

pra95pra95 Posts: 2Questions: 0Answers: 0
edited May 2014 in DataTables 1.10

HI, can you explain me how to get the UNIQUE row ID when I click on a Cell ?
I know that it is possible the get the table row index with that for instance :

$('#example tbody').on( 'dblclick', 'td', function () {
alert( 'Clicked on cell column: '+table.cell( this ).index().column+' and row: '+ table.cell( this ).index().row);
} );

But I want the UNIQUE row INDEX, which is there on the html code : "row_61430"

<tr class="odd" role="row" id="row_61430"><td class="sorting_1">00001V</td><td>Column 2</td><td>Column 3</td></tr>

Thank you very much.

Replies

  • allanallan Posts: 61,752Questions: 1Answers: 10,111 Site admin

    Just do this.parentNode.id :-).

    Allan

  • pra95pra95 Posts: 2Questions: 0Answers: 0

    Thank you Allan :)

This discussion has been closed.