I can't seem to get my child nodes to display. I have two classes, ReportSet and Report. ReportSet contains a binding list of Report.
I have my node layouts defined in the GlobalNodeLayouts like in the online documentation A first chance exception of type 'System.Reflection.TargetParameterCountException' occurred in mscorlib.dllSystem.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Node.IsExpanded; DataItem='XamDataTreeNodeControl' (Name=''); target element is 'ExpansionIndicator' (Name='ExpansionIndicator'); target property is 'IsExpanded' (type 'Boolean') TargetParameterCountException:'System.Reflection.TargetParameterCountException: Parameter count mismatch. at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) at Infragistics.Controls.Menus.NodeLayout.ResolvePropertyInfo(Object data) at Infragistics.Controls.Menus.NodesManager.EnsureDataManager() at Infragistics.Controls.Menus.NodesManager..ctor(Int32 level, NodeLayout nodeLayout, XamDataTreeNode parentLayoutNode) at Infragistics.Controls.Menus.XamDataTreeNode.get_ChildNodesManager() at Infragistics.Controls.Menus.XamDataTreeNode.get_HasChildren() at Infragistics.Controls.Menus.XamDataTreeNode.IsExpandedChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value) at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value) at System.Windows.Data.BindingExpression.UpdateSource(Object value)'
<ig:XamDataTree.GlobalNodeLayouts><ig:NodeLayout Key="SetLayout" TargetTypeName="ReportSet" DisplayMemberPath="Name" /><ig:NodeLayout Key="ReportLayout" TargetTypeName="Report" DisplayMemberPath="ReportName"/></ig:XamDataTree.GlobalNodeLayouts >
What i'm getting is the parent nodes, with expander icons beside them, but when I click on the expander nothing happens. Looking in the output I see this exception was raised:
Any idea whats happening here?Can the child items be BindingLists or do they have to be ObservableCollections?
Hi shaboboo,
I have attached a sample using the same xaml you provided. The hierarchical node structure works as expected. Perhaps I am not modeling the ItemsSource as you have it? I did use ObservableCollections, but I am under the impression that a BindingList would work as well.
Please review the sample and send it back modified to reproduce the issue i you can.
Thanks,
odd, that messge got screwed up... the exception was supposed to come below the rest, sorry if it confuses