1) My previous suggested solution for limiting digits to 1-5 with editorBegin and editorEnd can be bypassed by user when he presses any other numeric key for a longer duration.
So the following solution could be used based on editorKeyPress
editorKeyPress: function (evt, ui) {
if (ui.dataIndx === 'dataIndx of required column') {
//debugger;
var charsPermit = "12345",
charC = (evt.charCode || evt.keyCode),
chr = String.fromCharCode(charC);
console.log("keypress" , chr);
if (chr && charsPermit.indexOf(chr) == -1) {
return false;
}
}
},
2) editorEnd event doesn't necessarily mean the user made any changes in the cell, he may tab to another cell or escape out of the editor without making any changes. cellSave event is fired when the user makes changes in the cell.