This is a migrated thread and some comments may be shown as answers.

Clear the grid row selection if a user clicks outside the grid area.

1 Answer 31 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Amit
Top achievements
Rank 1
Amit asked on 29 Mar 2018, 03:40 AM

Hi Team,

I have query on RadgridView:

-Clear the grid row selection if a user clicks outside the grid area.

 

Thanks,

Amit Kulha

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 02 Apr 2018, 08:55 AM
Hello Amit,

In order to clear the selected row you can subscribe to the LostFocus event of the RadGridView. In the event handler, you can set the SelectedItem property to Null. Please, check the following code snippet:
private void gridView_LostFocus(object sender, RoutedEventArgs e)
{
    var gridView = sender as RadGridView;
    gridView.SelectedItem = null;
}

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Amit
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or