Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
505
hierarchical data not expanding
posted

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.dll
System.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?