I have a DataGrid with checkbox implemented on it using this code which I found on the internet.
<my:DataGrid.RowHeaderTemplate>
<DataTemplate>
<Grid>
<CheckBox IsChecked="{Binding Path=IsSelected, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type my:DataGridRow}}}" />
</Grid>
</DataTemplate>
</my:DataGrid.RowHeaderTemplate>
But, how can I get the selected rows? I am using WPF MVVM.