locked
Unselect all items in GridView RRS feed

  • Question

  • I see that the GridView control has a SelectAll() method to easily select all items.  I don't see a similar UnselectAll() method, however.  Am I missing something, or do I need to iterate through all selected items in order to unselect them individually?
    Thursday, February 7, 2013 7:58 PM

Answers

  • I believe GridView.SelectedIndex = -1 will do this.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by flybrarian Thursday, February 7, 2013 8:36 PM
    Thursday, February 7, 2013 8:29 PM
    Moderator