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. Image for the cookie policy date

Row edit lost when Enter key is hit.

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.

3 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team 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. 



DU duncan June 1, 2016 02:00 PM UTC

Thanks Seeni,

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

Regards,

Duncan


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon