I have a simple <ig:HierarchicalDataTemplate> that works. Shown below:
<UserControl.Resources>
<ig:HierarchicalDataTemplate ItemsSource="{Binding Sites}" x:Key="CompanyTemplate"> <DataTemplate> <TextBlock Text="{Binding company_name}" /> </DataTemplate> <ig:HierarchicalDataTemplate.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding site_name}" /> </DataTemplate> </ig:HierarchicalDataTemplate.ItemTemplate></ig:HierarchicalDataTemplate></UserControl.Resources>
CheckBoxes are enabled. Now I need to Bind the IsChecked property to an IsSelected property of each item. Is that possible in XAML? Is it possible in code? If so, how? I would prefer to do it in XAML.
Hello Joe,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well. As for the code formatting - when you are writing your post you can click the HTML button in the Edit Toolbar, which will opens a Dialog Window with the HTML of your post, and you can add the following tag around your code:
<pre name="code" class="c#:nogutter">
Your code….
</pre>
For C# and for XAML you can use this:
<pre name="code" class="xml:nogutter">
Hope this helps you.
Yes, that works perfectly. I had switched away from using XamDataTree because of a prior issue. But, 11.2 Service Release (12/15/2011) solved that issue and I am able to switch back to XamDataTree.
Thank you very much for your time and the sample project.
By the way, can you tell me the secret to insertig code inro a Post without it being re-formatted all over the place?
Joe
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want, but instead of XamTree I used a XamDataTree, where the thing you want to achieve is a built-in functionality. Please let me know if this satisfies your needs or you need further assistance on this matter.
Looking forward for your reply.