redraw table without ajax call and using local array
redraw table without ajax call and using local array
I am using server side processing and when i do myTableName.tbl.clear().draw(false) ajax is fired again.
How can i prevent ajax call on draw()?
myTableName.editor.on('submitComplete', function (e, data, action) {
var tbdata=myTableName.tbl.data();
debugger;
console.log(this.s.action)
if(this.s.action=='edit'){
}
if(this.s.action=='create'){
tbdata.push(data);
}
myTableName.tbl.clear().draw(false);
myTableName.tbl.rows.add(tbdata);
i know that this cant be done with server side processing. At least can i send a paramenter to server to return nothing and clear table? Can i do this with a search that returns nothing?
Which is the best way in your opinion?
http://www.quad-systems.pt/QUAD_HCM/#ajax/datatablePROTODocs.php
debug code : ipehan
Answers
If you are using server-side processing you can't. There is no option to not have DataTables make a request to the server on draw in SSP mode - that's the whole point of server-side processing after all.
Allan