We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ejGrid - Prevent "Enter" Key from Inline Edit Form Submission

Thread ID:

Created:

Updated:

Platform:

Replies:

130573 May 18,2017 11:24 AM May 19,2017 07:16 AM JavaScript 1
loading
Tags: ejGrid
Matt Abercrombie
Asked On May 18, 2017 11:24 AM

I have an inline edit form and need to be able to prevent form submission when the user presses the ENTER key. It appears to be calling "editFormValidate".

Mani Sankar Durai [Syncfusion]
Replied On May 19, 2017 07:16 AM

Hi Matt, 

Thanks for contacting Syncfusion support.  

We have analyzed your query and we can achieve your requirement using keySettings property in grid. We have also prepared a sample based on query that can be available from the below link. 
In this sample using keySettings property we can used to prevent the record save while pressing enter key.  By overriding the value of saveRequest a sub property of keySettings, you can prevent the saving Grid records while pressing enter key. The default value of the saveRequest is “13” keycode for an enter key 
Refer the code example. 
$(function () { 
                var element = $("#Grid"); 
                element.ejGrid({ 
                    dataSource: window.gridData, 
                    allowPaging: true, 
                    keySettings: { 
                        saveRequest: "",     //default key code is 13 for enter key 
                    }, 
                    ... 
                    columns: [ 
... 
                    ], 
                        }); 
                
            }); 

Refer the documentation link. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;