Below is a sample of my object as XML. I had to take out the actual data because of Privacy, but you should get the gist of things. Currently I have binding working pretty well, but I cant get a box to fill with the necessary Granchild information. The list box is working correctly, and its probably a logical issue on my end that I am just not seeing.
each doctor can have one or more doctoroffices, but each doctoroffice belongs to only one group which is a collection in itself. Nettiers enables an IdSource property that allows you to have the grandchild element defined instead of walking the hierarchy. That is what I am trying to fill in. The GroupIdSource is being populated but the binding is not grabbing it at all.
<TextBlock Grid.Row="0" Grid.Column="1" Background="blue" FontSize="12"
FontWeight="Bold" >
**<Label Content="{Binding Path=GroupIdSource.GroupName}**"/>
<Doctors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<EntityState> </EntityState>
<Id> </Id>
<DisplayName> </DisplayName>
<FirstName> </FirstName>
<LastName> </LastName>
<MiddleName> </MiddleName>
<Credentials xsi:nil="true" />
<AddDate> </AddDate>
<AddUserId> </AddUserId>
<ChangeDate> </ChangeDate>
<ChangeUserId> </ChangeUserId>
<ProviderTypeId> </ProviderTypeId>
<SpecialtyId> </SpecialtyId>
<DoctorOfficesCollection>
<DoctorOffices>
<EntityState> </EntityState>
<DoctorsId> </DoctorsId>
<ForeignId> </ForeignId>
<OriginalForeignId> </OriginalForeignId>
<Active> </Active>
<Address1> </Address1>
<Address2> </Address2>
<Address3> </Address3>
<City> </City>
<State> </State>
<Zip> </Zip>
<PrimaryPhone> </PrimaryPhone>
<Fax> </Fax>
<AlternatePhone1 xsi:nil="true" />
<AlternatePhone2> </AlternatePhone2>
<OfficeName xsi:nil="true" />
<OfficeDisplayName> </OfficeDisplayName>
<AddDate> </AddDate>
<AddUserId> </AddUserId>
<ChangeDate> </ChangeDate>
<ChangeUserId> </ChangeUserId>
<CommonOfficeIdentifier> </CommonOfficeIdentifier>
<GroupId> </GroupId>
<OfficeNotesCollection />
<HasChanges> </HasChanges>
<GroupIdSource>
<EntityState> </EntityState>
<Id> </Id>
<GroupCode> </GroupCode>
<GroupName> </GroupName>
<DoctorOfficesCollection />
</GroupIdSource>
</DoctorOffices>
</DoctorOfficesCollection>
<DoctorTaxonomyCollection>
<DoctorTaxonomy>
<EntityState> </EntityState>
<DoctorId> </DoctorId>
<OriginalDoctorId> </OriginalDoctorId>
<TaxonomySpecializationId> </TaxonomySpecializationId>
<OriginalTaxonomySpecializationId> </OriginalTaxonomySpecializationId>
<TaxonomyTypeId> </TaxonomyTypeId>
<OriginalTaxonomyTypeId> </OriginalTaxonomyTypeId>
<TaxonomyClassificationId> </TaxonomyClassificationId>
<OriginalTaxonomyClassificationId> </OriginalTaxonomyClassificationId>
<AddDate> </AddDate>
<AddUserId> </AddUserId>
<ChangeDate xsi:nil="true" />
<ChangeUserId xsi:nil="true" />
</DoctorTaxonomy>
</DoctorTaxonomyCollection>
<DoctorHome>
<EntityState> </EntityState>
<DoctorsId> </DoctorsId>
<OriginalDoctorsId> </OriginalDoctorsId>
<Address1> </Address1>
<Address2 xsi:nil="true" />
<Address3 xsi:nil="true" />
<City> </City>
<State> </State>
<Zip> </Zip>
<PrimaryPhone xsi:nil="true" />
<Fax xsi:nil="true" />
<AddDate> </AddDate>
<AddUserId> </AddUserId>
<ChangeDate> </ChangeDate>
<ChangeUserId> </ChangeUserId>
</DoctorHome>
<DoctorLicenses>
<EntityState> </EntityState>
<DoctorsId> </DoctorsId>
<OriginalDoctorsId> </OriginalDoctorsId>
<LicenseNumber> </LicenseNumber>
<DeaNumber xsi:nil="true" />
<NpiNumber> </NpiNumber>
<Bc_StateLicenseNumber> </Bc_StateLicenseNumber>
<ChampusIdNumber> </ChampusIdNumber>
<MedicaidLicenseNumber> </MedicaidLicenseNumber>
<Medicaid1500LicenseNumber> </Medicaid1500LicenseNumber>
<MedicareLicenseNumber> </MedicareLicenseNumber>
<MedchiNumber xsi:nil="true" />
<UpinNumber> </UpinNumber>
<AddDate> </AddDate>
<AddUserId> </AddUserId>
<ChangeDate> </ChangeDate>
<ChangeUserId> </ChangeUserId>
</DoctorLicenses>
<TaxonomyTypeIdTaxonomyClassificationIdTaxonomySpecializationIdTaxonomySpecializationCollection_From_DoctorTaxonomy />
<SpecialtyIdSource>
<EntityState> </EntityState>
<Id> </Id>
<OriginalId> </OriginalId>
<Description> </Description>
<Flag> </Flag>
<DoctorsCollection />
</SpecialtyIdSource>
<ProviderTypeIdSource>
<EntityState> </EntityState>
<Id> </Id>
<OriginalId> </OriginalId>
<Description> </Description>
<Flag> </Flag>
<DoctorsCollection />
</ProviderTypeIdSource>
<EditingUser> </EditingUser>
</Doctors>
Here is my Full XAML to help out too. I have a . databinding working up above, but there is a difference in how its bound to my dataview. Its bound directly to the object then its child...you can see it in the first listbox for NPINumber...
<Grid x:Class="Views.DoctorMasterDetailView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ad="clr-namespace:WavelengthIS.Infrastructure.AttachedProperties;assembly=WavelengthIS.Infrastructure"
xmlns:clr="clr-namespace:System;assembly=mscorlib"
xmlns:c="clr-namespace:WavelengthIS.Infrastructure.Converters;assembly=WavelengthIS.Infrastructure"
xmlns:vw="clr-namespace:WavelengthIS.Referee.Modules.DoctorMasterDetail.ViewModel"
MinHeight="480" MinWidth="640">
<Grid.Resources>
<c:StringTrimmingConverter x:Key="trimmingConverter" />
<c:CombineStringsConverter x:Key="CombineStringsConverter"/>
<c:TextToVisibilityConverter x:Key="TextToVisibilityConverter"/>
</Grid.Resources>
<Grid.DataContext>
<vw:DoctorMasterDetailViewModel/>
</Grid.DataContext>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="100" Width="150" />
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GridSplitter Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Background="Black"
ShowsPreview="false"
Width="2"/>
<ListBox x:Name="DoctorHeaderList" Grid.Column="0" Background="Green" Margin="0,0,2,0"
ItemsSource="{Binding DoctorsList}"
SelectedItem="{Binding SelectedDoctor}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<Border BorderBrush="Black"
BorderThickness="1"
Background="White"
Width="{Binding ElementName=DoctorHeaderList, Path=ActualWidth}"
CornerRadius="5"
Margin="5"
Padding="5">
<TextBlock Text="{Binding Path=DisplayName, Converter={StaticResource trimmingConverter}}" Foreground="Black" FontSize="14"/>
</Border>
<TextBlock Text="{Binding Path=DoctorLicenses.NpiNumber, StringFormat='NPI Number: {0}'}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox x:Name="DoctorOfficesList" Grid.Column="1" Background="Orange"
ItemsSource="{Binding Path=SelectedDoctor.DoctorOfficesCollection}" HorizontalContentAlignment="Stretch">
<!--DESIGN TIME BINDING ONLY!!!!!!!!!!!!!!!!!!!!-->
<!--<ListBox x:Name="DoctorOfficesList" Grid.Column="1" Background="Orange"
ItemsSource="{Binding Path=Offices}" HorizontalContentAlignment="Stretch">-->
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderThickness="2" BorderBrush="Black" CornerRadius="5" Margin="1" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition MinHeight="10" />
<RowDefinition MinHeight="35" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Background="red" >
<Label Content="Physician Number: "/>
<Label Content="{Binding Path=ForeignId, StringFormat='Physician Number: {0}'}"
FontSize="12" FontWeight="Bold" />
</TextBlock>
<TextBlock Grid.Row="0" Grid.Column="1" Background="blue" FontSize="12" FontWeight="Bold" >
<Label Content="{Binding Path=GroupIdSource.GroupName}"/>
</TextBlock>
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Background="green">
<StackPanel Orientation="Vertical" >
<TextBlock Margin="5,0,0,0" Text="{Binding Path=Address1, Converter={StaticResource trimmingConverter}}"/>
<TextBlock Margin="5,0,0,0" Text="{Binding Path=Address2, Converter={StaticResource trimmingConverter}}"/>
<TextBlock Margin="5,0,0,0" Text="{Binding Path=Address3, Converter={StaticResource trimmingConverter}}"/>
<TextBlock Margin="5,0,0,0">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}, {1} {2}">
<Binding Path="City"/>
<Binding Path="State"/>
<Binding Path="Zip"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5,0,0,0" FlowDirection="RightToLeft">
<TextBlock Text="{Binding Path=PrimaryPhone, StringFormat='Primary Phone: {0}'}"/>
<TextBlock Text="{Binding Path=Fax, StringFormat='Fax: {0}'}" />
<TextBlock Text="{Binding Path=AlternatePhone1, StringFormat='Alternate Phone 1: {0}'}"
Visibility="{Binding Path=AlternatePhone1, Converter={StaticResource TextToVisibilityConverter}}" />
<TextBlock Text="{Binding Path=AlternatePhone2, StringFormat='Alternate Phone 2: {0}'}"
Visibility="{Binding Path=AlternatePhone2, Converter={StaticResource TextToVisibilityConverter}}" />
</StackPanel>
</StackPanel>
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>