New to Telerik UI for WPF? Download free 30-day trial

Cancel Invalid Cell Edit on Click Outside of RadGridView


Product Version 2019.3.917
Product RadGridView for WPF


How to cancel changes in invalid GridViewCell and exit edit mode when another control gets the focus.


To do this, you can subscribe for the GotFocus event of the control that should steal the focus from RadGridView and in the event handler, call the CancelEdit method of RadGridView.

    <telerik:RadGridView x:Name="radGridView" /> 
    <telerik:RadButton x:Name="cancelEditButton" GotFocus="cancelEditButton_GotFocus"/> 

private void cancelEditButton_GotFocus(object sender, RoutedEventArgs e) 
In this article