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

In Grid Edit mode


the edit mode of the current record will automatically lost when another record is selected. How can we avoid this? Is is possible to leave the edit mode by save or cancel button?

Tuong Trinh

3 Replies

BM Bala Murugan A.S Syncfusion Team October 15, 2013 12:51 PM UTC

Hi Tuong Trinh,


Thanks for using Syncfusion Products.


We glad to let you know that we have created a workaround for your requirement. Please refer the below code snippets.




<script type="text/javascript">

                    $(document).ready(function () {

                        window.Temp_OnGRMouseUp = window.EG_OnGRMouseUp; //store this event in temp

                        window.EG_OnGRMouseUp = Custom_OnGRMouseUp; //define custom client side method to prevent selection and saving records on other row selection



                    function Custom_OnGRMouseUp(evt) {

                        var src = GetEventSrcElement(evt);

                        if (src.tagName == "TD") {

                            var td = GetGTCell(src);

                            if (td == null) {



                            var tr = td.parentNode;

                            var gridObj = GetEGridObj(tr);

                            var isCurRow = gridObj.IsCurrentRow(tr);

                            if (gridObj.GetState() == "Edit") {

                                if (!isCurRow) {

                                    gridObj.AllowClientSideSelection = false; //prevent client side selection

                                    evt.cancelBubble = true;




                            else {

                                gridObj.AllowClientSideSelection = true;







The above solution can be achieved by overriding the EG_OnGRMouseUp client side method and preventing the client side record selections with postback.


For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.


Sample: PreventSelection.zip


Please let us know if you have any concerns.



Balamurugan A.S

TT Tuong Trinh October 15, 2013 03:33 PM UTC

Hi Balamurugan A.S,

this workaround is fantastic. 

Thank you for helping out.

Tuong Trinh

BM Bala Murugan A.S Syncfusion Team October 16, 2013 11:59 AM UTC

Hi Tuong Trinh,

Thanks for your update.

Please get back to us if you need any further assistance.

Balamurugan A.S

Live Chat Icon For mobile
Up arrow icon