Closed Apoorva14396 closed 1 year ago
Hello,
We do not support v8 of the library any longer and we have recently deprecated Angular Way examples.
Please upgrade to latest version to make use of TemplateRef
and Angular Pipes.
I am closing this issue now.
Trying to create checkbox and ng-multiselect-dropdown column in angular datatables. but after the implementation of following code getting [Object, Object] in the browser display.
in .ts file
his.dtOptions = { pagingType: 'full_numbers', responsive: true, serverSide: true, processing: true, autoWidth: true, searchHighlight: true, visible: true, api: true, "ordering": true, searchDelay: 2000, "scrollCollapse": true, 'columnDefs': [ { 'orderable': false, targets: 0, width: 20, className: 'select-checkbox' }, { targets: 1, }], ajax: (dataTablesParameters: any, callback) => { this.checkClass = "overlay"; this.newService.getNewList("test", dataTablesParameters) .subscribe(resp => { console.log("resp is", resp) this.checkClass = "hiddenOverlay"; this.totRecs = 15; if (this.totRecs === 10000 && this.showPop) { this.delayedPopover(); } callback({ recordsTotal: 15,// assign total records recordsFiltered: 15,// assign total records data: resp.body['data'], }); }); }, columns: [ { data: null },//checkbox1 { data: null },//checkbox2 { data: 'FIELD1', "defaultContent": "N/A" }, { data: null }, //multiselectdropdown ], rowCallback: (row: Node, data: any[] | Object, index: number) => { const self = this; $($('td', row)[0]).unbind('click'); $($('td', row)[0]).bind('click', () => { // self.someClickHandler(data, row, index); }); return row; }
in .html file
output is checkbox and drivers field with [Object, Object]