How can I have nested tables when building the table with ajax ?
How can I have nested tables when building the table with ajax ?
Hi,
I'm using ajax to build a datatable with json.
Here is the JavaScript code to create the table:
function buildDataTableAjax(tableId, dataUrl) {
table = $('#' + tableId).DataTable({
processing: true
, serverSide: true
, ajax: dataUrl
//,ajax: { url: "OverallAlerts.aspx/Test", "dataSrc": 'data' },
, deferRender: true
, responsive: true
, pageLength: 15
, pagingType: "full_numbers"
, stateSave: true
, language: {
paginate: {
next: " ",
previous: " ",
first: "First",
last: "Last"
}
}
, lengthMenu: [[15, 30, 50], [15, 30, 50]]
});
}
Is there a way in which I can build the json for the datatable to include a nested table ?
If not, how can I add the nested tales under the correct rows ?