Hello,
When the grid is in edit mode, pressing the ENTER key cancels the edit mode. Each row has several columns of text fields and the upload button (Kendo upload control) is on the last column.
With the Navigatable option, I can tab on each column to edit the text and when I tab into the upload button column and hit enter to upload files, the edit mode is gone and no pop-up window to select files. This behavior is the same with text fields; if I hit the enter key, the fields are closed (not open for edit).
How do I fix this? It's the grid that doesn't allow the upload control to use the enter key to launch it. Only the mouse CLICK can launch the upload button but I need the upload button to work with the enter key as well.
Below are the options of the grid:
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.Events(e => e.FilterMenuInit("filterMenuInit")) <== I tried this but not working
.Navigatable()
function filterMenuInit(e) {
if (e.field == "PdfFileUpd") { <== I used the browser debugging tool and found this the ID of upload button
e.container.find("input").keydown(function (e) {
if (e.keyCode === 13) {
$(this).focus().trigger('click');
}
});
}
}
Below is the columns in the Grid for the upload option:
columns.Bound(p => p.PdfFileUrl).EditorTemplateName("PdfFileUrl").Title("My File").ClientTemplate("Upload").Sortable(false).Filterable(false);
Other than that, the grid works fine. Does anyone know how I can make the Enter key to work normally in edit mode?
Thank you.