hola a todos, espero alguien me pueda ayudar, tengo la siguiente función:
function onloadtableApprovedHRBP(){
$("#tbodyapprovedhrbp tr").remove();
$.ajax({
url: "ajax/hrbp_approved_unit.php",
success: function (data) {
var html = "";
console.log(data);
$.each(data, function (i, d) {
$("#tbodyapprovedhrbp").html("");
html = html + "<tr>";
html = html + "<td>" + d.NominationDetails_id + "</td>";
html = html + "<td>" + d.Nomination_Title + "</td>";
html = html + "<td>" + d.Signum + "</td>";
html = html + "<td>" + d.EmployeeName + "</td>";
html = html + "<td>" + d.Country + "</td>";
html = html + "<td>" + d.Company + "</td>";
html = html + "<td>" + d.OrganizationalUnit + "</td>";
html = html + "<td>" + d.Manager_EmployeeName + "</td>";
if(d.MoneyAmount_Manager_Proposed=="" || d.MoneyAmount_Manager_Proposed==0){
html = html + '<td>' + d.MoneyPercent_Manager_Proposed + " Monthly Base Salary Percentage" + '</td>';
}else{
html = html + '<td>' + d.MoneyAmount_Manager_Proposed + " Fixed EUR Amount" + '</td>';
}
html = html + '<td>' + d.HRPB_ApprovalDate + '</td>';
if(d.ApprovedAmount=="" || d.ApprovedAmount==0){
html = html + '<td>' + d.MoneyPercent + " Monthly Base Salary Percentage" + '</td>';
}else{
html = html + '<td>' + d.ApprovedAmount + " Fixed EUR Amount" + '</td>';
}
html = html + '<td>' + '<button class="btn" onclick="hrpb_detailsApproved(' + d.NominationDetails_id + ')">Detail Information</button>';
html = html + "</tr>";
})
//table.draw();
$("#tbodyapprovedhrbp").append(html);
var table = $('#example2').DataTable({
"paging": true,
"retrieve": true,
'rowsGroup': [0,1,11],
"order": [[ 0, "desc" ]],
"pagingType": "full_numbers"
} );
},
error: function (xhr, status, statusText) {
alert("No matching records found ");
console.log('An error occurred');
}
});
}
que alimenta una datatable, cuando hago un cambio con ajax, vuelvo a entrar en dicha funcion pero rowsGroup no lo hace, alguien me puede ayudar?
de antemano muchas gracias por la ayuda, de igual forma si lo soluciono, se los compartiré.