I am trying to figure out how to bind a dataset datatable with a self referencing relationship into the tree. I have tried many options none of witch seem to work. I sort of understand the relationship between the TargetTypeName and the underlying data. From my unerstanding its not a property or method but a type that it is trying to match in the underlying data source... I think? If so then the type for both my nodes parent and child is the same... and that did not work... This is simple to recreate... I used the employees table from northwind but any self referencing dataset datatable will do.
EmployeesTable returns a stringly typed EmployeesDataTable - Example from Northwind DB Employees table.
I get the first level but cant seem to get anything else... Plus since this releationship can go more than two deep do i need to create another nodelayout one for as many levels as i think my data will go or is one second child level enough for it to create all other levels based on the data. The ChildLayout below is not working this was just one thing i tried.. Also can you explain a little more on how the key comes into play. I read a post the described its usage in some cases to assist in finding the item... but not quite sure how this works.
<ig:XamDataTree ItemsSource="{Binding EmployeesTable}" Name="employeesXamDataTree"> <ig:XamDataTree.GlobalNodeLayouts> <ig:NodeLayout Key="ParentLayout" TargetTypeName="EmployeesRow" DisplayMemberPath="LastName"/> <ig:NodeLayout Key="ChildLayout" TargetTypeName="EmployeesRow.GetEmployeesRows" DisplayMemberPath="Title"/> </ig:XamDataTree.GlobalNodeLayouts> </ig:XamDataTree>
Any assistance is appreciated
Hello,
Thank you for your post. I have been looking into it, but I wasn’t able to reproduce your behavior, because your post is in the Silverlight section and you mention DataSet, which is not supported in Silverlight and I not completely sure how your data is organized, so if this is still an issue for you, could you please send me an isolated sample project, where this is reproduced, so I can investigate it further for you.
Looking forward for your reply.
I will repost in WPF - Just looking for a quick example of how the xamdatatree works with "typed" datasets for example the self referency Employees table for northwind sample db. Having trouble figuring out how to get the tree to show parents and children employess.
I believe Yanko has already answered to your thread in the WPF forum. Here is the link to it:
http://community.infragistics.com/forums/t/63955.aspx