WPF DataTemplateSelector criteria change but the template does not get reapplied?
-
30-10-2019 - |
题
I have a DataTemplateSelector which is applied to a DataGridTemplateColumn. It is correctly providing me with a DataTemplate that varies depending on certain information in my DataRow (in other columns).
So far so good.
However, when I now alter data in my grid which would cause a different DataTemplate to be chosen by the selector for that column it does NOT automatically show this new DataTemplate.
I read in Pro WPF in C# 2008 by Matthew MacDonald (Apress) page 564 that this is known issue and the only way around is to release the Selector and reapply this which would be very slow when there are many records in my table.
Has anyone found a way around this or maybe in .NET4 there is a new feature that combats this issue?
Thanks
Marcel
没有正确的解决方案