dataTable object not working
dataTable object not working
Hello All,
i am trying to reload dataTable using 'DataTable.draw(false);' but it fires bellow errors.
TypeError: DataTable.draw is not a function
bellow is my code
```var DataTable = $('#table-example').dataTable({
'processing': true,
'serverSide': true,
'searching': false,
'ajax': {
'url': 'http://127.0.0.2:8080/users',
'type': 'POST',
'data': function(d){
var json =JSON.parse(JSON.stringify(jQuery('#formmain').serializeArray()));
var formdata=[];
for(i=0; i< json.length; i++)
{
formdata[json[i].name] =json[i].value;
}
return $.extend( true,{},d,formdata);
}
},
'columns':[
{'data':'id'},{'data':'username'},{'data':'firstname'},{'data':'lastname'},{'data':'city'},{'data':'email'},{'data':'mobile'},{'data':'action'}
]
});```
This question has an accepted answers - jump to answer
Answers
Have you tried with fnDraw()??
yes,..but same problame..same error..