In
ASP.NET MVC Project I am using Knockout and DataTable for data binding,
<tbody data-bind="dataTablesForEach: {data: customerList, dataTableOptions: tableOptions}">
<tr>
<td data-bind="text: customerName"></td>
<td data-bind="text: creationDate"></td>
<td data-bind="text: transType"></td>
<td data-bind="text: address"></td>
</tr>
</tbody>
But in my case the customers list, each item contains sub list called skillsList So, I want to add data to table like that:
<tbody data-bind="dataTablesForEach: {data: customerList, dataTableOptions: tableOptions}">
<tr>
<td data-bind="text: customerName"></td>
<td data-bind="text: creationDate"></td>
<td data-bind="text: transType"></td>
<td data-bind="text: address"></td>
</tr>
foreach(var skill in skills)
{
<tr>
<td data-bind="text: customerName"></td>
<td data-bind="text: creationDate"></td>
<td data-bind="text: phone"></td>
<td data-bind="text: address"></td>
<td data-bind="text: skill"></td>
</tr>
}
</tbody>