I am creating an orgchart. Data was loaded properly. What I would like to do is selecting a node then export data of the node into an excel. I tried to find a handler that helps me to identify the node where the mouse click is. I tried to implement the handlers provided in the Xamorgchart such as OnMouseLeftButton down, but it never be invoked. It could be that I implemented in a wrong way, I need some advise on this.
Thanks
Hello,
SelectionNodesCollectionChanged event will raise when the selected nodes is modified. Let me know if you have any questions.
Hi Michael
Thanks for getting back to me on this. I am using VB and I already created this event but when I selected node(s), this event was never triggered (I put a breakpoint in there). I wonder if I need to implement some thing extra in order to trigger this event. I already set the selection mode to be multiple.
I will try your code then let you know the result, Thanks for your help.
It works perfectly. I implemented almost the same as your code base on the example provided on Infragistics website but it did not work since I structured the code incorrectly. Your sample definitely teach me something new and correct way. I appreciate your help and thank you..
Hi,
Thanks for following up. Let me know if there is anything else I can help you with.
With you help, I am now able to use the trigger. We currently use Orgplus to display organization structures and we want to move off orgplus and use infragistic instead. I am doing a feasibility study on Infragistic. I did a quick demo last week on using infragistic. Clients were happy and they want me to explore more features of Infragistic to see if it can fulfill their needs. Among their requirements, there are three items that could be a challenge and I am not sure that we can do it: (I search infragistic website but I could not find the answer)
1. Include an image in a node (Canadian flag in the attached picture)
2. Color the background for specific node. (Greenish of one node in the attached picture)
3. Add some label outside the node. (100%, SP, 31-10, 2015 in the attached picture)
I attach an image of what I would like to achieve. Could you tell me if it is possible to do so and some guide line or direction to achieve that. Your help is much appreciated.
Yes! You can put virtually anything inside a node of the OrgChart via a DataTemplate. An example of customizing the layout can be found here: Using Custom Node Item TemplatesLet me know if you have any questions.
What errors are you getting? Can you provide a complete sample demonstrating the issue? The code above looks fine.
I tried to include the template for an image to a nodelayout using the example you shoe me but I got errors since I am totally new to XAML. Could you show me how to create a template to include image in a node layout for the code below.
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ig="http://schemas.infragistics.com/xaml"
xmlns:local="clr-namespace:OrgChart_VB"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<ig:XamOrgChart ItemsSource="{Binding Departments}" SelectedNodesCollectionChanged="XamOrgChart_SelectedNodesCollectionChanged" SelectionType="Multiple">
<ig:XamOrgChart.DataContext>
<local:DepartmentViewModel />
</ig:XamOrgChart.DataContext>
<ig:XamOrgChart.GlobalNodeLayouts>
<ig:OrgChartNodeLayout
TargetTypeName="Department"
DisplayMemberPath="Name"
Key="EmployeePositions" />
TargetTypeName="EmployeePosition"
DisplayMemberPath="JobTitle"
Key="Employees" />
TargetTypeName="Employee"
DisplayMemberPath="FirstName" />
</ig:XamOrgChart.GlobalNodeLayouts>
</ig:XamOrgChart>
</Grid>