I'm trying to bind to an EntityCollection, have an entity added and not change the CurrentItem. If you bind to an IBindingList, then the grid will create a BindingListCollectionView over the IBindingList. When the grid calls AddNew it will go through https://github.com/dotnet/wpf/blob/master/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/BindingListCollectionView.cs#L590 and change the CurrentItem and hence the SelectedItem with this type of binding
<telerik:RadGridView ItemsSource="{Binding TradeEntityCollection}" IsSynchronizedWithCurrentItem="True" CanUserInsertRows="True" NewRowPosition="Top" SelectedItem="{Binding SelectedTrade, Mode=TwoWay}"
AutoGenerateColumns="False" >
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding TradeNumber}"></telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
This does not happen with ObservableCollection and the ObservableCollection is the behaviour I want. I do not want a change in SelectedItem (in the above binding) until the new row is committed to the grid (this is what you get with ObservableCollection). So it's not that it fails, so much as the IBindingList behaviour is less desirable than the ObservableCollection behaviour (for me at least).
Does the implementation of IListSource come from
<taskPreset name="SD.Tasks.Generic.EntityClassesGenerator" requiresCleanCache="false">
<parameters>
<parameter name="destinationFolder" value="[dbgenericSubFolder]\EntityClasses" />
<parameter name="templateID" value="SD_EntityAdapterTemplate" />
</parameters>
</taskPreset>
?
Thanks for the DataScope reference (looks similar to Ria Context).