We have created an app that relies on refreshing the view for the datapresenters instead of relying on INotifyPropertyChanged. If we refresh the view, the values of the native types update just fine, but the custom objects don't. The attached project contains a repro.
You guys are awesome for customer support. Thank you for getting back to me so quickly!
I expected the view being refreshed to refresh everything everywhere and to force the property that contained the custom object to be reloaded as well, even though the reference hadn't changed. This was just unexpected behavior for me and I posted it to flag it as a possible bug. But if this is expected and "by design," that's fine. I will just create a new object every time.
Thanks,
Adam
Hi,
If I understand correctly the problem is that the firs column is not refreshing. From what I see in the code the reason the values remain the same is that in the C# code you are updating the Value property of the already created object (SubObject). After calling refresh since the object itself is the same the ToString method does not get called and as a result only the second column is changing. In order to update the first column as well you should create a new object and change its value.
Replace: parent.Child.Value = m_Rand.Next();With: parent.Child = new SubObject() { Value = m_Rand.Next()};
I am not sure if this will be of any use in that case.
Thanks,Slavi