dataTable object not working

dataTable object not working

pravinspravins Posts: 2Questions: 1Answers: 0
edited March 2015 in Free community support

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

  • RamprakashRamprakash Posts: 14Questions: 7Answers: 1
    edited March 2015 Answer ✓

    Have you tried with fnDraw()??

  • pravinspravins Posts: 2Questions: 1Answers: 0
    edited March 2015

    yes,..but same problame..same error..

This discussion has been closed.