I have defined NodeLayout's as follows:
NodeLayout myLayout = new NodeLayout();myLayout.Key = "CompanyLayout";myLayout.TargetTypeName = "Company";myLayout.DisplayMemberPath = "company_name";
NodeLayout myLayout2 = new NodeLayout();myLayout2.Key = "SiteLayout";myLayout2.TargetTypeName = "SecurityApp.CAPs.Model.Site";myLayout2.DisplayMemberPath = "site_name";
MyTree.GlobalNodeLayouts.Add(myLayout);MyTree.GlobalNodeLayouts.Add(myLayout2);
But I'm only getting the top level Company name list in the tree display. Not seeing any expansion icons to the left of company name. I have checked everything I can think about. Compared to the example in the documentation, I can't see the differance. Any ideas on how to troubleshoot will be greatly appreciated.
Hi jgreen274,
I think the solution for your case is that you need to create those NodeLayouts and assign them to XamDataTree before setting its ItemSource. For example in the Loaded event of XamDataTree first create couple of NodeLayouts that adequate corespond to your objects and then set the ItemsSource to the XamDataTree. If you still have any difficulties please share them in order to assist you!
Regards,
Nikola
I am creating the NodeLayouts and assigning them to XamDataTree before setting its ItemsSource. Still have the problem. I have attached my Company.cs file because I'm wondering if the problem is due to the way my entities are defined. SiteCollection derives from ObservableCollection<Site> but for some reason Site is not being recognized as a target. Shouldn't this work?
I would have replied sooner but I've been trying every thing I can think of to no avail.
Thank you for your help,
Joe