I'm having trouble with the component XamOrgChart. The documentation only shows examples with XML file. How to use SQL server with IDParent?? I suggest to include documentation such example. thanks
I'm having the same issue....
Any response???
Thanks
Fabian.
Hello,
You can set up the Global Node Layouts to use the Definition the Database tables and the associated relationships.
For example, if I create an Entity Data Model for the Employee in the NorthWind database such that my Entity is Employee and my Relationship is named Employees1.
Then I can create my Global Node Layouts to use this relationship:
<ig:XamOrgChart x:Name="NWOrgChart" Margin="100,100">
<ig:XamOrgChart.GlobalNodeLayouts>
<ig:OrgChartNodeLayout TargetTypeName="Employee"
DisplayMemberPath="LastName"
/>
<ig:OrgChartNodeLayout TargetTypeName="Employees1"
Key="Employees1"/>
</ig:XamOrgChart.GlobalNodeLayouts>
</ig:XamOrgChart>
Then I only need to massage my data back from the database slightly to ensure I only have one root:
Employees = context.Employees;
var Managers = (from emp in Employees
where emp.Employee1 == null
select emp).ToList();
NWOrgChart.ItemsSource = Managers;
and I have my Org Chart.
I have attached a sample which uses SL but the code should be relatively the same using WPF.
Sincerely,
Valerie
Developer Support Engineer
Infragistics
www.infragistics.com/support