locked
GridView - deselect all items

    Question

  • Sorry for the basic question but I do not see how to do this.

    I am using a GridView in my of my applications.  I have a button at top to select all items and I use the SelectAll() method to select all items but I do not see a method to Deselect all selected items.   Is there a way to deselect all selected items?

    I thought about getting a list of selected items using the SelectedItems() method but it returns an IList of my display objects so I am unable to deselect the items.

    Thanks,

    Jon

    Tuesday, September 02, 2014 1:06 PM

Answers

  • Try to call the GridView.SelectedItems.Clear() method:

    <GridView x:Name="gridView"/>

    gridView.SelectedItems.Clear();
    

    • Marked as answer by Jon Hoffman123 Tuesday, September 02, 2014 1:33 PM
    Tuesday, September 02, 2014 1:29 PM

All replies

  • Try to call the GridView.SelectedItems.Clear() method:

    <GridView x:Name="gridView"/>

    gridView.SelectedItems.Clear();
    

    • Marked as answer by Jon Hoffman123 Tuesday, September 02, 2014 1:33 PM
    Tuesday, September 02, 2014 1:29 PM
  • I knew it had to be something easy.  Was just stuck and could not find it.

    Thanks,

    Tuesday, September 02, 2014 1:33 PM