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

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

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

 

 

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
6647 04/14/2016 03/29/2017 WPF SfDataGrid 4.5 13.4.0.53
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.