Код: Выделить всё
this.dataTable2 = roles.$table.find(".organization-roles-table").DataTable({
paging: true,
serverSide: true,
processing: true,
deferLoading: 0, //prevents table for ajax request on initialize
responsive: false,
listAction: {
ajaxFunction: _itemSerialsService.getAllDataByItemID,
inputFilter: function () {
return {
itemId: organizationTree.selectedOu.id,
serialValueFilter: $('#tbSerialNumber').val(),
locationClassificationIds: $('#hdnSelectedLocations').val(),
isNotPrinted: $('#chkSelectNotPrinted').prop('checked')
}
}
},
columnDefs: [
{
targets: 0,
data: null,
orderable: false,
className: 'text-center',
render: function (data, type, row) {
if ($('#hdnIsManual').val() == '') {
if (row.isManual) {
$('#hdnIsManual').val('true');
$('#AddUserToOuButton4').attr("title", "Manual");
}
else
$('#hdnIsManual').val('false');
}
return ``;
},
checkboxes: {
selectRow: true
}
},
У меня есть эта функция рендеринга:
Код: Выделить всё
render: function (data) {
return `
${data.itemSerial.serialValue}
`;
}render: function (data) {
return `
${data.itemSerial.serialValue}
`;
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... erates-tds