How to get Id value by clicking Edit button on the same row of DataTable
<p>I use <code>jQuery Datatable</code> for listing records and add an <code>Action</code> button (Edit) for editing the record on a modal dialog. If I select a row I can get the row id value and open the related record on modal dialog. However, if I click the <code>Edit</code> button directly, I cannot get the Id value of the related record (on the same row) because it is not selected first when clicking <code>Edit</code> button. What I want to do is that: I want to get the Id value of the row on which I click the Edit button. Is it possible? If not, can I select the hovered row programmatically when I click the <code>Edit</code> button? (If the prior scenario is possible I would prefer it). Any idea?</p>

<pre><code>function openModal() {

    var table = $('#dtbListAccount').DataTable();
    var oRow = $('this').parents('tr')[0];
    var oData = table.fnGetData(oRow);

    //code omitted for brevity
};
</code></pre>

<p><a href="https://i.stack.imgur.com/zBEFn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zBEFn.png" alt="enter image description here"></a></p>