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

RadGridView problem deselecting all during SelectionChanging event

1 Answer 15 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chuck
Top achievements
Rank 1
Chuck asked on 17 May 2014, 04:52 PM
When a user selects an item in the GridView, my application needs to select all others of the same type.  This part is working, the problem I'm having is when the user selects an item of a different type (which I detect in the SelectionChanging event) - I'm unable to clear the existing selection while in the SelectionChanging() event. 

I call GridView.SelectedItems.Clear(), but (I assume because I am in the SelectionChanging event) nothing happens.  Is this a bug, and is there a workaround to clear the GridView selection while in a SelectionChanging event?  Thanks.

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 21 May 2014, 03:40 PM
Hello Chuck,

I've tried to reproduce the problem you report but to no avail. You can clear GridView's SelectedItems collection in SelectionChanged event. I have prepared a sample project that you can find attached. Could you check it and let me know how it works on your side?

Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Chuck
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or