title: How to deselect all DataGrid rows in code using MVVM
body: <p>I have a view with a dataGrid and the ViewModel. I want that when some condition occurs, deselect all the rows selected.</p>
  
  <p>With Windows.Interactivity I can covert an event into a command, so with the event selectedChanged of the dataGrid. Then I check the conditions, and I can set the SelectedIndex to -1 if I want to deselect the items, nut this only works if I have only one item selected, if I have more than one, It does not work.</p>
  
  <p>How can I deselect all the rows selected?</p>