Hello,
I can't figure out the binding to the HierarchicalDataTemplate.
I'm able to populate the Childnodes fine., but no luck with the parentNodes
Any thoughts would be great
Regards,
Rick Mueller
I can't figure out the binding to the HierarchicalDataTemplate.
I'm able to populate the Childnodes fine., but no luck with the parentNodes
Any thoughts would be great
Regards,
Rick Mueller
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <NewDataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Table> <CompanyName>Digital Kitchen1</CompanyName> <Location>Eden Prairie1</Location> <ContactName>Rick Mueller</ContactName> <ContactTitle>PrepCook</ContactTitle> <EmpImage>male.jpg</EmpImage> <StDate>15664</StDate> <EmpId>156</EmpId> </Table> <Table> <CompanyName>Digital Kitchen</CompanyName> <Location>Eden Prairie</Location> <ContactName>Willie The Dog</ContactName> <ContactTitle>LineCook</ContactTitle> <EmpImage>male.jpg</EmpImage> <StDate>40535</StDate> <EmpId>156</EmpId> </Table> <Table> <CompanyName>Digital Kitchen</CompanyName> <Location>Eden Prairie</Location> <ContactName>Jose Sosa</ContactName> <ContactTitle>Dishwasher</ContactTitle> <EmpImage>male.jpg</EmpImage> <StDate>40535</StDate> <EmpId>156</EmpId> </Table> <Table> <CompanyName>Digital Kitchen</CompanyName> <Location>Eden Prairie</Location> <ContactName>Maria Anders</ContactName> <ContactTitle>BroilerCook</ContactTitle> <EmpImage>female.jpg</EmpImage> <StDate>40535</StDate> <EmpId>156</EmpId> </Table> </NewDataSet><Window.Resources> <XmlDataProvider x:Key="Contact" Source="xmlData/Employee.xml" XPath="NewDataSet/Table"/> <HierarchicalDataTemplate x:Name="TreeData" DataType="XmlDataProvider" ItemsSource="{Binding Contact}"> <TextBlock Text="{Binding XPath=ContactTitle}" Foreground="Black" FontWeight="Bold" FontSize="15" /> </HierarchicalDataTemplate> <DataTemplate x:Key="Team"> <TextBlock Text="{Binding XPath=ContactName}" Foreground="Blue" FontWeight="Bold" FontSize="9" /> </DataTemplate> </Window.Resources> <Grid> <telerik:RadTreeView Height="311" HorizontalAlignment="Left" Margin="320,0,0,0" Name="radTreeView1" VerticalAlignment="Top" Width="183" ItemsSource="{Binding Source={StaticResource Contact},XPath=ContactTitle}" ItemTemplate="{StaticResource Team}"/> </Grid>