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

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: 13.4.0.53
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.

C#

 

Samples:

WPF

WinRT

UWP

 

 

 

2X faster development

The ultimate UWP UI toolkit to boost your development speed.
ADD COMMENT
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.

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