I am using a Kendo UI Grid with pop-up editing. By default, when a user edits a field in a pop-up editor and enters the enter key, the data is transferred to the grid (behind the pop-up editor), but the pop-up window remains visible and the save event does not fire until you click Refresh.
I am trying to change this functionality, so when the user presses the input while editing the field, he calls the "Refresh" button - this means that he will display the data in the grid, trigger the save event and close the editor pop-up window.
My current attempt simply closes the popup editor, but does not fire a save event and discards changes made to any fields for the selected row. Instead, the Cancel button was clicked.
options.edit = function (e) {
$('.k-edit-field .k-input').on('keypress', function (e) {
utils.onEnter(e, function () {
$('.k-grid-update').trigger('click');
});
});
};
How can I trigger a refresh button, or at least mimic what it does?
source
share