button into a column on a HTML Table problem

button into a column on a HTML Table problem

hi

i am working on create a HTML table with some columns, in 1 column i have a button(1 button for each row) with the class="verDetalle" 

in this thread: 
i have solved part of my problem (detect the click event).

  1. $(document).on('click', '.verDetalle', function () {
  2.    console.log($(this).text());
  3.    alert(this.rowIndex);
  4.    var widsala = $("#xcombsalas option:selected").val();
  5.    var $wRenglon = $(this).closest("tr");
  6.    var $myId = $wRenglon.find("td:nth-child(1)");
  7.    debugger;
  8.    var whtml = '';

the console.log display "Ver Detalle" (line 2)
the alert not display the rowIndex, display a "undefined" message (line 3).
in the line 5 i want know which button was pressed(the row), and in line 6 i start get the values of each cell.

not work thes code, how to fix?

Thanks