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

How to cancel the AddNewRow operation in single Esc key from EditMode?

Platform: UWP |
Control: SfDataGrid |
Published Date: April 14, 2016 |
Last Revised Date: March 29, 2017 |
.NET Framework: 4.5 |
Product Version:
Tags: addnewrow

In SfDataGrid, Editing is cancelled when you press Esc key. When AddNewRow cell is in edit mode, AddNewRow operation is cancelled when you pressed the Esc key twice.

Since when you press the Esc key in AddNewRow cell which is in edit mode below actions will happen,

  1. At first key press, cell editing get canceled
  2. At second key press AddNewRow operation is canceled.

On the other hand, you can cancel the AddNewRow operation in single Esc key by

override the GridSelectionController class and cancel the AddNewRow operation in HandleKeyDown event as like below code snippet.










2X faster development

The ultimate UWP UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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