Hello,
Databinding doesn't seem to work for me if I create a RadTreeview instance in the code and assign a HierarchicalDataTemplate as the item template. Here is what I am doing.
_treeInstallDates.ItemTemplate =
this.Resources["InstallTreeNodes"] as Telerik.Windows.Controls.HierarchicalDataTemplate;
ObservableCollection<POSInstallTreeModel> itemsToBind = new ObservableCollection<POSInstallTreeModel>();
installItems.ForEach(p => itemsToBind.Add(p));
_treeInstallDates.IsVirtualizing =
true;
_treeInstallDates.ItemsSource = itemsToBind;
_treeInstallDates.UpdateLayout();
And here is the XAML
<telerik:HierarchicalDataTemplate x:Key="InstallTreeLeafItems">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding ImageSrc}" ToolTipService.ToolTip="{Binding TooltipText}">
</Image>
<TextBlock Text="{Binding StoreNum}"></TextBlock>
</StackPanel>
</telerik:HierarchicalDataTemplate>
<telerik:HierarchicalDataTemplate x:Key="InstallTreeNodes" ItemTemplate="{StaticResource InstallTreeLeafItems}" ItemsSource="{Binding StoreData}">
<TextBox Text="{Binding Path=POSInstallDate}"></TextBox>
</telerik:HierarchicalDataTemplate>
What am I doing wrong here?