I have a table like this
<table>
<tr>
<td class="text-center">
<input class="form-control clsEmployeeId" id="txtEmployeeId" type="text" id="employeeId" value="' + mainList.EmployeeId + '"/>
</td>
<td class="text-center">
<input class="form-control clsEmployeeName" id="txtEmployeeName" type="text" id="employeeName" value="' + mainList.EmployeeName + '"/>
</td>
<td class="text-center">
<input type="button" value="Details" style="color: Red;" id="btnDetails" class="clsbtnDet"/>
</td>
</tr>
</table>
What I want is to iterate a list and fill those fields and there is a secondary list of each row (Contains Employee Details) inside the main one and that secondary list data need to fill a modal which initiate by clicking the "Details "button.
Any help will be much appreciated.