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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Row edit lost when Enter key is hit.

Thread ID:

Created:

Updated:

Platform:

Replies:

124315 May 31,2016 02:26 PM UTC Jun 2,2016 04:52 AM UTC JavaScript 3
loading
Tags: ejGrid
duncan
Asked On May 31, 2016 02:26 PM UTC

If I edit a row cell using the pencil from the edit toolbar on my grid, and then saving via the toolbar, the value is saved.

If I edit a cell and then press the Enter key,the value is lost.

Please can someone tell me one of the following:

a) How to disable the Enter key within the grid.
b) How to make this functionality work correctly. I would expect this to work out of the box.

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On June 1, 2016 10:33 AM UTC

Hi Duncan, 

From your query, we understood that you would like to prevent the saving of record 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 to the following code example and Help Document. 

    <div id="Grid"></div> 
    <script type="text/javascript"> 
        $(function () { 
            $("#Grid").ejGrid({ 
                // the datasource "window.gridData" is referred from jsondata.min.js 
                dataSource: window.gridData, 
                allowPaging: true, 
                keySettings: { 
                    saveRequest: "", 
                }, 
                      . . . . 
                       . .. .  
            }); 
        }); 
    </script> 


We have prepared a sample that can be referred from the following jsPlayground. 


if we misunderstood your query, please get back to us with the following information to analyze and provide you solution as early as possible. 

1)      Code example of Grid 
2)      Exact replication procedure of issue 
3)      Whether the changes has been lost, after saving the Grid using enter key? 
4)      If possible, modify the attached sample and replicate the issue. 

Regards, 
Seeni Sakthi Kumar S. 


duncan
Replied On June 1, 2016 02:00 PM UTC

Thanks Seeni,

I've implemented your suggested approach & this resolves my issue. Thankyou.

Regards,

Duncan

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On June 2, 2016 04:52 AM UTC

Hi Duncan, 

Thanks for the update. 

We are happy to hear that your requirement has been achievement. Get back to us if you need further assistance on this. 

Regards, 
Seeni Sakthi Kumar S. 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;