RadGridView problem deselecting all during SelectionChanging event

2 posts, 0 answers
  1. Chuck
    Chuck avatar
    9 posts
    Member since:
    Jan 2013

    Posted 17 May 2014 Link to this post

    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.
  2. Yoan
    Admin
    Yoan avatar
    1214 posts

    Posted 21 May 2014 Link to this post

    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.
     
Back to Top