Hi telerik,
There has four tables:School--->College--->Department---->Class,all of them are 1:n relationship.
Now,I use RadGridView DomainDataSource and CollectionViewSource to show the data,like this:
<telerik:RadGridView ItemsSource="{Binding ElementName=classDomainDataSource, Path=Data}" AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewComboBoxColumn ItemsSource="{Binding ElementName=schoolDomainDataSource, Path=Data}" DisplayMemberPath="Name" Header="School" DataMemberBinding="{Binding Department.College.School}">
</telerik:GridViewComboBoxColumn>
<telerik:GridViewComboBoxColumn ItemsSource="{Binding Source={StaticResource schoolCollegeViewSource}}" DisplayMemberPath="Name" Header="College" DataMemberBinding="{Binding Department.College}" />
<telerik:GridViewComboBoxColumn ItemsSource="{Binding Source={StaticResource schoolCollegeDepartmentViewSource}}" DisplayMemberPath="Name" Header="Department" DataMemberBinding="{Binding Department}" />
<telerik:GridViewDataColumn Header="Class" DataMemberBinding="{Binding Name}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>DomainDataSrouce and ColltionViewSource:
<UserControl.Resources>
<CollectionViewSource x:Key="schoolCollegeViewSource" Source="{Binding Path=Data.College, ElementName=schoolDomainDataSource}" />
<CollectionViewSource x:Key="schoolCollegeDepartmentViewSource" Source="{Binding Path=Department, Source={StaticResource schoolCollegeViewSource}}" />
</UserControl.Resources>
<riaControls:DomainDataSource AutoLoad="True" Name="schoolDomainDataSource" QueryName="GetSchoolQuery">
<riaControls:DomainDataSource.DomainContext>
<my:DS />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
<riaControls:DomainDataSource AutoLoad="True" Name="classDomainDataSource" QueryName="GetClassQuery" >
<riaControls:DomainDataSource.DomainContext>
<my:DS />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
the problem is: GridViewComboBoxColumn do not work.....
thanks.
here is the project and database