I have called the table to show jquery data table and it is working as long as i dont put data into it.<table id="applyFilterTable" class="table table-bordered table-condensed table-responsive" cellspacing="0" width="100%" />
I am trying to add data in multiple ways see the code below.
my data set variable has data in it.function rebuildTable_applyFilterTable(data) {
console.log('inside table'+data[0].EID__c);
var dataset = [];
for(var i=0;i<data.length;i++){
var ds = [];
ds.SID = data[i].EID__c;
ds.Name = data[i].Name;
dataset.push(ds);
}
j$('[id$="applyFilterTable"]').DataTable({
//"data" : dataset,
"scrollY": "260px",
"scrollCollapse": true,
"paging": true,
"searching": true,
"ordering": true,
"info": true,
"dom": 'Bfrtip',
"destroy" : true,
"buttons": [
'copy',
{extend: 'csvHtml5',title: 'Criteria export'},
{extend: 'excelHtml5',title: 'Criteria export'},
{extend: 'pdfHtml5',title: 'Criteria export'},
'print'
],
"columns": [
{ title: "EID",data:dataset.EID},
{ title: "Name",data:dataset.Name}
]
} );
}
1)i tried data:dataset which is throwing me the following error.
2)if i add the above code of adding data along with title it is not at all showing and not even throwing any errors.is there a way that my page will not fail. all i need is how to add dataDataTables warning: table id=applyFilterTable - Requested unknown parameter '0' for row 0, column 0. For more information about this error, please see http://datatables.net/tn/4
Hi raj,I have more than 1k records. it range from <1k to 3k records. jquery data table will have its own pagination and it also helps with export. And they want to export all 3k records at once. if i use custom pagination it is not possible.