Thank you for Contacting Syncfusion support,
We have analyzed your query. When you Press escape key two times, validation will be clear , this is the behavior of SfDataGrid. But you can keep the validation on by overriding SelectionController and CurrencyManager. Please refer the below code snippet.
this.sfDataGrid.SelectionController = new CustomGridSelectionController(this.sfDataGrid);
public class CustomGridSelectionController:GridSelectionController
protected override GridCurrentCellManager CreateCurrentCellManager()
var currentcellManager = new CustomCurrentCellManager(this.DataGrid,this.SuspendUpdates,this.ResumeUpdates);
public class CustomCurrentCellManager:GridCurrentCellManager
public override bool HandleKeyNavigation(KeyEventArgs args, RowColumnIndex rowColumnIndex)
if (args.Key == Key.Escape && !this.CurrentCell.IsEditing)
return base.HandleKeyNavigation(args, rowColumnIndex);
We have prepared a sample based on this and you can download it from below location,
Sample Location: SfDataGrid_Validation.zip
Please let us know if you have any other queries,
I appreciate the support and the example, but I really want is the user capability to cancel add new row without this little issue that I am facing.
I couldn´t reproduce the issue with the provided code, so I added a column which has a list of names on a GridMultiColumnDropDownList (silly code might be) as I have it in my grid;
If you click on addnewrow on CustomerName Column, then trigger the validation (clic outside the row), after that press esc key, clic inside the same column again and finally press esc key again, the next time that you have clicked outside the row, it will allow me to add the row without following the validation.
I know that this might look like a rare case but I think I am using or I am declaring something wrong.
Thanks and Regards,
We were able to reproduce the problem and wehave logged defect report regarding this. A support incident #137088 to track the status of this defect has been created under your account. Please log on to our support website to check for further updates
Please let me know if you have any questions.