$(function () {
var element = $("#Grid");
element.ejGrid({
dataSource: window.gridData,
allowPaging: true,
keySettings: {
saveRequest: "", //default key code is 13 for enter key
},
...
columns: [
...
],
});
}); |
good evening I have a problem on an ej grid, I wish that when I have to confirm the data in the ej grid I don't have to press the enter key on the keyboard but I can click with the muose off the grid. good job
actionComplete: function(args) {
if (args.requestType == "beginedit"){
$("#" + this._id).on("mouseleave", function(e){ //mouseleave event
var gridObj = $("#Grid").data("ejGrid");
var ddl = $(".e-ddl-popup")
if ((e.relatedTarget == null) || (!ddl)) {
gridObj.endEdit(); // calling endEdit method for saving edited cell
}
});
}
}
|