Uncaught TypeError: $.fn.dataTable.TableTools is not a function

Uncaught TypeError: $.fn.dataTable.TableTools is not a function

Ashish000911Ashish000911 Posts: 1Questions: 1Answers: 0

I am new to using the DataTable.js file. I want to add the button on my table. I am using Knockout.Js with DataTable.js.
I am using TableTools 2.2.4 and DataTables 1.10.7 in my code. Could some one please help me with the problem.

Sample Code is added for your reference.

getAppoiintmentData: function () {
var self = this;
showLoadingImage();
$.ajax({
type: "POST",
url: url
data: "",
error: function (xhr, status, error) {
noty({ text: "Failed to load Appointment data.", timeout: 5000, type: NOTY_MSG_TYPE.error });
hideLoadingImage();
// do something about the error
},
success: function (response) {
self._extractAppointment(response.ReturnData);
ko.applyBindings(MANAGE_APPOINTMENT_VIEW);
var table = $("#appoinmentListdatatable").DataTable({ responsive: true });
$.fn.dataTable.TableTools(table, {
"buttons": [
"copy",
"csv",
"xls",
"pdf",
{ "type": "print", "buttonText": "Print me!" }
]
});
hideLoadingImage();
}
});
},

This discussion has been closed.