hello,
i want to know how can i represent the org-chart according to the levels request,
we have huge data, i want to display only the levels of chart according to the choices of users(i know i can control that from the data but in our scenario we need control that from the org-chart).
thank you
Hello ehabows,
Thank you for your post!
I have been looking into your post and have created a small sample application for you. There is a property MaxDepth of the XamOrgChart, that can be set to define the visible hierarchies. More about this property you can find on the following link from our documentation: http://help.infragistics.com/Help/Doc/Silverlight/2014.1/CLR4.0/html/xamOrgChart_Maximum_Node_Depth.html.
In the sample application I have implemented the above mentioned functionality for you. Please find the attachment and feel free to let me know if you have any further questions on this matter.
thank you for your fast support,
it's working perfectly now, but i got another issue, i was display the node count by the below method,
private int GetNodeCount(Infragistics.Controls.Maps.OrgChartNode node){ int count = 0; if (node != null) { count = 1; foreach (var childNode in node.ChildNodes) { count += GetNodeCount(childNode); } } return count;}
and when i use the MaxDepth property the count is not correct, i got the count of all nodes not the displayed nodes only
Thank You
Ehab
Hello Ehab,
Thank you for the feedback.
I have been looking into your additional question. You can use the Level property of the OrgChartNodes. You can check if this Level is less or equals the MaxDepth property. If it meets this condition it means, that the node would be visible. This way you can get the visible nodes only. More about the Level property of the OrgChartNode you can find on the following link from our documentation: http://help.infragistics.com/Help/Doc/WPF/2014.1/CLR4.0/html/InfragisticsWPF4.Controls.Maps.XamOrgChart.v14.1~Infragistics.Controls.Maps.OrgChartNode~Level.html.
Please do not hesitate to let me know if you have any further questions on this matter.
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.