1
votes

I want to be able to select and unselect WPF DataGrid rows from C# code in a manner that be MVVM friendly.

I am using caliburn micro

1
Are you using its DataGrid control or WPF's own DataGrid? - fhnaseer

1 Answers

1
votes

Bind your grids SelectedItem and SelectedItems To an object and list(observablecollection) of object.

Then you can change the property on your viewmodel and trigger a PropertyChanged event to reflect this in your UI