Datatable.wrap() function is not working.

Datatable.wrap() function is not working.

tejas_msofttejas_msoft Posts: 2Questions: 1Answers: 0
edited May 2016 in Free community support

it is giving console error as: $(...).DataTable(...).wrap is not a function
My table definition is:
var menuDataTable = $('#menuListTable1').DataTable({
"destroy": true,
"aaData": result,
"paging": false,
"bFilter": false,
"bInfo": false,
"aoColumns": [
{"sTitle": "Actions", "sWidth": "5%"},
{"sTitle": "Section", "sWidth": "10%"},
{"sTitle": "Sub Menu", "sWidth": "10%"},
{"sTitle": "Menu Id", "sWidth": "20%"}
]
}).wrap("

");

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,794Questions: 1Answers: 10,514 Site admin
    Answer ✓

    That's because there is no wrap method in the DataTables API. The full list of methods is available here.

    Is there something in the documentation that suggests there is such a method? if so, can you point me to it so I can remove it.

    If you want to use the jQuery $().wrap() method then use $('#menuListTable1').wrap(...).

    Allan

  • allanallan Posts: 63,794Questions: 1Answers: 10,514 Site admin

    p.s. I've deleted the duplicate discussion on this topic. Please don't post duplicates :-).

  • tejas_msofttejas_msoft Posts: 2Questions: 1Answers: 0

    Thanks for your reply allan. $('#menuListTable1').wrap(...) worked....
    thanks a lot...

This discussion has been closed.