I want to get handsontable data on button click. for this, I'm calling the buttonSave function. But on var JSON I'm getting an error as $container.data is not a function. Where I'm doing wrong?
Code is as below:
function buttonSave() {
var $container = document.getElementById("divadhoc");
var json = $container.data('handsontable').getData();
}
data
is a jquery function but container is no jquery object. Use $('#divadhoc')
to create the jquery object.