table is not reloading
table is not reloading
var rowDataSet = [];
var resultItems = [];
var featuresdata = [];
var data = [];
for (var attr in featureAttributes) {
var objectt = { sTitle: attr };
resultItems.push(objectt);
}
for (var i = 0; i <= featuresdata.length-1; i+=resultItems.length) {
var eachdata = [];
for (j=0; j < resultItems.length; j++) {
eachdata.push(featuresdata[i + j]);
}
data.push(eachdata);
}
var i = 0;
$.each(data, function (key2, val2) {
var rowData = [];
var j = 0;
$.each(data[i], function (key2, val2) {
rowData.push(val2);
j++;
});
rowDataSet.push(rowData);
i++;
});
var table = "";
table= $('#tblfeaturedetails').DataTable({
dom: 'Bfrtip',
"bDestroy": true,
bRetrieve: true,
bProcessing: false,
"paging": true,
"ordering": false,
"info": false,
searching: false,
"pageLength": 5,
data: rowDataSet,
columns: resultItems,
width: 'auto',
"language": {
"emptyTable": "No data to Display",
"zeroRecords": "Nothing found - sorry",
}
});
data is not displaying second time.I tried to destroy table and recreate but its showing error
uncaught type error cannot read property aDataSortof undefined
Answers