error in fnDestroy()
error in fnDestroy()
deric
Posts: 5Questions: 1Answers: 0
Hi everyone, Many thanks Allan for this plugins.
why i've got errot nTableWrapper is null or ntd is undefined when i use fndestroy(), its work in first click but in second click i've got this error . here is the link http://jsfiddle.net/yt57V/
Thank's for your answer
in this link the js should be like that:
var dataTable = $('#example').dataTable({"sPaginationType": "full_numbers"});
var j = [];
j.push(
{"sTitle": 'Numss Pli',"aTargets": [0]},
{"sTitle": 'Clients',"aTargets": [1]},
{"sTitle": 'Prestation',"aTargets": [2]},
{"sTitle": 'Commande',"aTargets": [3]},
{"sTitle": 'Nom lot',"aTargets": [4]},
{"sTitle": 'new',"aTargets": [5]}
);
$("#delete").click(function() {
dataTable.fnDestroy()
var a = $('#example').dataTable({
"sPaginationType": "full_numbers",
"aoColumnDefs":j
});
});
i'd like to add new column after destroying the datatable
This discussion has been closed.
Replies
You are using a very old version of DataTables - 1.9.0 in fact. Using the latest release appears to allow it to work as expected: http://jsfiddle.net/yt57V/203/ .
Allan
Ok , thanks Allan , but why i'v got this error TypeError: nTd is undefined when i try something like that :
and call it like that:
and it's turn me TypeError: nTd is undefined
Can you give me a link to a test case that shows that issue please.
Allan