Hi
I was reading along about the hierarchical data binding for the XAM tree,, can anyone please help me figure out the following scenario:
1. ID Parent ID Name Code 2. 1 Null DE DE 3. 2 NULL MAUM MAUM 4. 3 2 M/F Ex M/F EX 5. 4 2 M/F EY M/F EY The number of levels to which the tree can go down is not fixed
The data template i am using is;'
<igTree:XamWebTree IsDraggable="True" Name="xamWebTree1" Width="Auto" AllowDrop="True" Height="auto" > <igTree:XamWebTree.HierarchicalItemTemplate> <ig:HierarchicalDataTemplate ItemsSource="{Binding MyChildren}"> <ig:HierarchicalDataTemplate.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding DisplayName}"/> </DataTemplate> </ig:HierarchicalDataTemplate.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding DisplayName}" /> </DataTemplate> </ig:HierarchicalDataTemplate> </igTree:XamWebTree.HierarchicalItemTemplate> </igTree:XamWebTree>
The list<T> that i am assigning as a items source is generated in the back end and the class structure is::
public class NodeItem { public long ParentId { get; set; } public string DisplayName { get; set; } public string Code { get; set; } [Key] public long Id { get; set; } [Association("MyChildren", "Id", "ParentId")] public List<NodeItem> MyChildren { get; set; } public NodeItem() { } }
Right now I get all the elements in one single flat level.. the hierarchies is not getting populated.
Please reply as soon as possible..
Thanks
Harisha,
This functionality is not currently possible with the XamTree. I've logged a Feature Request (FR12481) with Product Management for n-level hierarchical data binding in the XamTree.
You may inquire at a later point with our Developer Support manager about the status of this feature request by sending an email to DSManager@Infragistics.com, and including the Feature Request number in the subject.
Thanks,
Francis
I would like this too.
The standard silverlight tree can do this but it does not automatically tick the checkboxes of parent nodes when data is bound to it like yours. I need both in the same control.
This functionality is available with the XamDataTree, introduced in NetAdvantage for Silverlight and WPF 10.3.
Attached is a sample demonstrating a simple n-tier data tree with an ItemTemplate applied throughout. There are also checkboxes on the nodes.