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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to remove the top-right corner error mark from the GridCell by pressing Esc key when validated by handling the CurrentCellValidating event?

 

In the SfDataGrid, validation can be done by handling the CurrentCellValidating event. The SfDataGrid does not allow the end-user to move to the other cells until the validation succeeds. In a meantime, you can move to the other cells after pressing Esc key that resets the validation status and error message at the top-right corner.

 

 

It is possible to reset the validation status when the end-user presses Esc key from the edit mode by overriding the GridSelectionController. In the following code example, the validation status and top-right corner error indication is reset by invoking the ValidationHelper.ResetValidations method on pressing the Esc key by overriding the ProcessKeyDown method of the GridSelectionController.

 

For WPF:

 

For WinRT:

 

Note: You need to override the GridCellSelectionController class when the SelectionUnit is GridSelecionUnit.Cell.

The corner error mark is enabled when the employeesalary less 20000 as shown in following screenshot

Sample Links:

WPF

WinRT

UWP

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework:
5318 08/08/2015 02/05/2016 WinRT SfDataGrid 4.5
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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