If the OnDemandCacheSize is set to anything other than '0', the number of features in the FeatureDataGrid seem to represent the number of features within the map extent + the OnDemandCacheSize size.
Any ideas if this might be a bug or am I missing setting some obligatory attributes in XAML (even though the same behavior is seen in the ESRI example)? Or does '0' in the case of OnDemandCacheSize mean infinite, which does not sound logical to me?
The behavior you see in the SDK sample is normal for OnDemandCacheSize=0. However, there was a bug related to this property prior to v2.1 where OnDemandCacheSize=0 results to the records being duplicated but this had been fixed before v2.1 final.