Why is there no SelectedItems property exposed through XAML? Is there no way to bind to a grid's selected items without using code behind and completely breaking the MVVM pattern?
Any word on a fix for this?
I got a response from Infragistics about this issue and basically you should not bind DataItem.IsSelected to the DataRecordCellArea.IsSelected property. Infragistics said adding support for that would require a new feature request, even though it seems like a bug to me. Without this data binding, I had to add code which keeps the 2 values in sync with each other - so that when one value gets updated the code manually updates the other and vice versa. This approach is not MVVM, but at least it works.
Good to know. I didn't end up using this method after all. I used MVVM Light Toolkit and EventToCommand and included the EventArgs. Maybe not the most MVVM-type of solution but works for me fine.
I reported the issue with using that IsSelected method also. I wouldn't use that method since the grid screws up the selected items when you scroll the grid. The grid simply doesn't support MVVM very well. I recommend using code behind to set the viewmodel's selected items.
Could it be because the grid recycles the styles. I think I have seen this kind of behaviour with styles. Bad news is that I don't know how to fix it. I don't think resetting the style ie. in InitializeRow -event will do much good if the row selection just disappears.