Hello, I’m having difficulty in making a logic to check the existance of ‘invalid’ cells, before calling a Ajax program.
https://jsfiddle.net/3oygjwbz/1/
In the given sample, A2 cell is having an invalid value (the string ‘NG’ is put while the cell’s cellProperties.type is being NUMERIC.)
Thus it is causing a problem in G2 cell (calculation result is being #VALUE!).
In my sample, I placed the Save button, which ignites the Ajax logic to send the passed data to Server side logic (PHP).
Before igniting an Ajax call, is there any good way to detect ‘invalid’ cells in the spreadsheet, and when there is, stop to ignite the Ajax call?
I want to do something like the below code.
Do we have hot1.hasError() function?
// Save Button
Handsontable.dom.addEvent(btn_save, ‘click’, function() {
// do something here using AJAX
if (hot1.hasError()) {
// display error message to the system user, and do NOT allow to proceed to a Ajax call until the invalid cell gets fixed.
}
else {
// proceed to a Ajax call
}
});