title: how to get row index of selected row
body: <p>this is my view
  <img src="https://i.stack.imgur.com/cW3Bu.png" alt="enter image description here"></p>
  
  <p>im trying to access row index using this method</p>
  
  <pre><code>$("input.deliverQty").focusout(function (e) {
      var table = document.getElementById('invoiceDetailTbl');
      var DeliverQty = $(this).val();
      var rowId = $(this).closest('tr').attr('rowIndex');
      //var OrderQty = $(this).closest('tr').find('input.payingAmt').val();
      var OrderQty = table.rows[parseInt(rowId) + 1].cells[2].childNodes[0].data;
  </code></pre>
  
  <p>but result was undefined
  <img src="https://i.stack.imgur.com/KUwp0.png" alt="enter image description here"></p>
  
  <p>i'm append my table like this</p>
  
  <pre><code>for (var i = 0; i &lt; data[0].itemDetails.length; i++) {
                  itmCode = data[0].itemDetails[i].item_Code;
                  itmName = data[0].itemDetails[i].item_Name;
                  OQty = parseInt(data[0].itemDetails[i].item_Qty);
                  //netAmt = parseFloat(data[i].Net_Amt).toFixed(2);
                  //paidAmt = parseFloat(data[i].Paid_Amt).toFixed(2);
                  //balance = (parseFloat(netAmt) - parseFloat(paidAmt)).toFixed(2); //id = "damt['+i+']"
                  $("#invoiceDetailTbl tbody").append("&lt;tr id=" + i + "&gt;" + "&lt;td&gt;" + itmCode + "&lt;/td&gt;" + "&lt;td&gt;" + itmName + "&lt;/td&gt;" + "&lt;td&gt;" + OQty + "&lt;/td&gt;" + "&lt;td&gt;" + '&lt;input type="text" class="deliverQty form-control input-sm" style="width: 100px;" placeholder="Deliver Qty" id="dqty"&gt;' + "&lt;/td&gt;" + "&lt;td&gt;" + '&lt;span class="glyphicon glyphicon-trash"&gt;&lt;/span&gt;' + "&lt;/td&gt;" + "&lt;/tr&gt;");
                  //noOfItems = parseInt(noOfItems) + parseInt(OQty);
                  //noOfProducts = parseInt(noOfProducts) + 1;
              }
  </code></pre>