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

Is there an event thrown when the user abort adding a new row ?

Thread ID:





125534 Aug 23,2016 03:17 PM UTC Aug 24,2016 02:00 PM UTC WPF 1
Tags: SfDataGrid
Asked On August 23, 2016 03:17 PM UTC


I have joined in a SfDatagrid the event AddNewRowInitiating and it works very well.

But I'm not able to find (if it exists) an event raised when the user decides to abort the new row insertion pressing the Esc key.
Is there the possibility to be advised by an event when such a situation occurs ?

Jai Ganesh S [Syncfusion]
Replied On August 24, 2016 02:00 PM UTC

Hi Silvio, 
We have analyzed your query. You can use the below code to handle AddNewRow abort operation by override GridSelectionController. 
this.datagrid.SelectionController = new GridSelectionControllerExt(this.datagrid); 
public class GridSelectionControllerExt : GridSelectionController 
        public GridSelectionControllerExt(SfDataGrid datagrid) 
            : base(datagrid) 
        public override bool HandleKeyDown(KeyEventArgs args) 
            if (this.DataGrid.View.IsAddingNew && !this.DataGrid.SelectionController.CurrentCellManager.CurrentCell.IsEditing) 
                // Write your code here 
            return base.HandleKeyDown(args); 
Jai Ganesh 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