Q1:What is the best way to validate the data entered by user in jQuery Handsontable before sending to Server?
I have read this article
Upload jQuery Handsontable input
Is there any integrate solution? etc integrating to the jquery validation plugin,if not, how about using the onbeforechange() method?
Q2:What’s more, I have initiated a 100 rows table , but it’s probably the user would input only 50 rows, if I use the code below:
$('#btnGo').click(function() {
var rowList = $("#example9grid").handsontable("getData");
$('#simple').val(JSON.stringify(rowList));
console.log(rowList);
});
the rowList would return 50 data rows and 50 empty rows.
How to remove all the empty rows?
A1:Thanks for Marcin’s reply,I have solved this problem by using these code below:
A2:I have remove the empty row by using these code below: