$('#tblAllApprovedequets').DataTable({ "processing": false, "ajax": { "url": "/UniformApproval/GetAllApprovedRequestByEmployeeId?employeeId=" + empId , "dataSrc": function (json) { return JSON.parse(json); } }, "columns": [ { "data": "DepotName" }, { "data": "EmpName" }, { "data": "ProductName" }, { "data": "ProductCode" }, { "data": "Color" }, { "data": "Size" }, { "data": "ApprovedDate" }, { "data": "OrderedQty" }, { "data": "Rate" }, { "data": "Total" }, { "data": "Comment" } ], order: [[0, 'asc'], [1, 'asc']], rowGroup: { dataSrc: ["EmpName", "DepotName"], startRender: function (rows, group, level) { var total = rows .data() .pluck("Total") .reduce(function (a, b) { return a + b; }); return $('') .append('' + group + '') .append('') .append('') .append('') .append('') .append('') .append('') .append('' + parseFloat(total).toFixed(2) + '') .append(''); } }, "columnDefs": [ { "targets": [1], "visible": false }, { "targets": [0], "visible": false }, { "className": "dt-center", "targets": "_all" }, { "targets": [8, 9], "render": function (data, type, full) { return parseFloat(data).toFixed(2); } }, ], "pageLength": 40, scrollY: "300px", scrollX: true, paging: false });