Hello,
I have a XamDatagrid with three fieldlayouts:
0. Parent-projects
1. Optional child-projects
2. assigend ressources to parent or child project
At the moment the combination of 0+2 works very fine.
Some parent projects contain also child-projects. If such child-projects exits I need to expand them and show the assigned resources.
This means that I have sometimes a relation between 0+2 and sometimes 0+1 and 1+2
Questions:
1. How do does XAML for this scenario look like?
2. How do I need to design the relation between the fieldlayouts 0,1 and2?
Your input is very welcome
Thanks
Niko
Hi Nikolaus,
Thank you for posting to Infragistics Community!
I have been looking into your question and I believe the “Displaying Hierarchical Data” topic from the XamDataGrid documentation will be quite helpful on the matter.
Additionally, I have prepared a small sample with a XamDataGrid displaying a 3-level hierarchical data, which you can find attached below.The sample demonstrates handling the InitializeRecord event of the grid in order to expand records that have children. Optionally, the expansion indicator visibility could be altered as well:
private void XamDataGrid_InitializeRecord(object sender, Infragistics.Windows.DataPresenter.Events.InitializeRecordEventArgs e) { if (e.Record.HasChildren) { e.Record.IsExpanded = true; } else { e.Record.ExpansionIndicatorVisibility = Visibility.Collapsed; } }
Best regards, Bozhidara Pachilova Associate Software Developer
3000.XDGHierarchicalData.zip