DataTables warning: table id='planprice' - Cannot reinitialise DataTable.
DataTables warning: table id='planprice' - Cannot reinitialise DataTable.
Manyata sappe
Posts: 2Questions: 2Answers: 0
Hi, am working with datatables, am getting the above error. i want show two datatables in my page so am initializing the datatable twice with two different id. Below is my code.
function planDT(planConfig,result){
planConfig.data=result;
var planDTtbl=$('#planslist').DataTable(planConfig);
return planDTtbl;
}
function planpriceDT(planpriceConfig,result){
planpriceConfig.data=result;
var planpriceDTtbl=$("#planprice").DataTable(planpriceConfig);
return planpriceDTtbl;
}
here is planConfig:
$scope.planConfig = {
"processing": true,
stateSave: true,
dom: 'Bfrltp',
"aoColumns": [{
"mData": "",
],
}
};
and result my json data result.
Please anyone hepl me.
Thank you in advance.
This discussion has been closed.
Answers
Hi @Manyata sappe ,
DataTables seems to think you're reinitialising the table with the id
#planprice
- so I'd start there. See if thatplanpriceDT
function is being called multiple times, or if you've put the ID on both your tables by accident. If still no joy, if you put a link to your page here, we can take a nose,Cheers,
Colin