Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Xamgrid and heterogeneous collections

I have the following class hierarchy (pseudocode):


DerivedClass1 : BaseClass

DerivedClass2 : BaseClass

I have a heterogeneous collection of BaseClass items that contains DerivedClass1 and DerivedClass2 items. When I bind this collection to a xamgrid and specify columns in xamgrid columns as following:

x:Name="XamGrid_Mygrid" d:DataContext="{d:DesignInstance viewModel:BaseClassListViewModel,IsDesignTimeCreatable=False}"
ItemsSource="{Binding PagedCollection}"
<ig:TextColumn IsFixable="True" x:Name="Base Clas" Key="BaseClass" HeaderText="Base Class" />
<ig:TextColumn IsFixable="True" x:Name="Derived Clas" Key="DerivedClass" HeaderText="Derived Class" />
<ig:PagerSettings AllowPaging="Bottom" />

I get runtime error saying that the Column called DerivedClass (which is present in DerivedClass1) is not found. What is a way around it?