public class BaseType
{
public int Id { get; set; }
}
public class ChildType1 : BaseType
{
public string Name1 { get; set; }
}
public class ChildType2 : BaseType
{
public string Name2 { get; set; }
}
// View model
public class WindowViewModel : ViewModelBase
{
public ObservableCollection<
BaseType
> Items { get; }
}
I have a problem with binding to ItemSource from ViewModel with
ObservableCollection. It's a generic collection of base type e.g.
BaseType. Moreover I have a few child classes inherited from BaseType.
They contain loads of additional properties of simple types such like
double, int, string. For each child type I have another DataTemplate
with different column definitions. When I'm opening the window,
System.ArgumentException is throwing from Telerik with message "Property
with name XXX cannot be fround on type BaseType". Due to this problem,
GridView's performance is unacceptable (in release mode either).
How to solve that problem?
Thanks for help!