I'm trying to create a reference into the row cell. This is my code:
<table class="table table-striped table-bordered table-hover little_margin_table" id="data-table" width="100%">
<thead>
<th>First Name</th>
<th>Email</th>
<th>Password</th>
</thead>
<tbody>
@foreach (var item in Model.Items)
{
<tr id="@item.Id">
<td>@item.FirstName</td>
<td>@item.Email</td>
<td>@item.Password</td>
</tr>
}
</tbody>
</table>
Javascript code:
$(document).ready(function () {
$('#data-table').dataTable({
bFilter: false,
aoColumnDefs: [
{
bSortable: false,
aTargets: [1, 2],
},
{
"targets": 0,
"render": function (data, type, full, meta) {
return '<a href = "@(Url.Action("IndexPage", "Company"))/' + ROWID '</a>';
}
},
]
})
Here I am assuming the row Id :
<tr id="@item.Id">
How can get it to into the function render:
"render": function (data, type, full, meta) {
return '<a href = "@(Url.Action("IndexPage", "Company"))/' + ROWID '</a>';
Help, please.