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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Prevent from click outside editing row

Thread ID:





144586 May 13,2019 02:36 PM UTC May 14,2019 11:46 AM UTC Angular - EJ 2 3
Tags: Grid
James Evangelist
Asked On May 13, 2019 02:36 PM UTC

i've got a question. Is there any way to prevent a user to click outside current editing row? User can only edit row by selecting one and clicking 'Edit' button on the toolbar. If he wants to save changes he can click on 'Update' button (also on toolbar). While editing, user can click outside editing row and then edit mode is turning off - I want to prevent this situation.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On May 14, 2019 08:51 AM UTC

Hi James, 

Greeting from Syncfusion. 

We have analyzed your requirement and we can achieve your requirement using the toolbarClick, actionBegin event of Grid. Please refer the below code example and sample for more information. 

<ejs-grid #grid id='Normalgrid' [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar' (actionBegin)='actionBegin($event)' (toolbarClick)='toolbarClick($event)' > 
        . . . . . 

    this.flag = false; 
actionBegin(args: any) :void { 
    if(args.requestType ==='save'){ 
        // when apply args.cancel as true then it prevent from save action 
        args.cancel = (this.flag) ? true : false; 
        this.flag = true; 

Refer the help documentation. 

Thavasianand S. 

James Evangelist
Replied On May 14, 2019 11:25 AM UTC

This solution works great! Thanks for help.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On May 14, 2019 11:46 AM UTC

Hi James, 
We are happy that the problem has been solved. 
Please get back to us if you need any further assistance.  
Thavasianand S.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon