Hey,
I would like to implement Infragistic's XamDataTree but I'm having a problem with binding a NodeLayout to a dictionary.
One of my Items in the Hierarchy holds a property of a dictionary, which I'd like to bind the DataTree's Node Layout too. Actually, to be more specific, I only need to bind the NodeLayout to the dictionary's values list.
However, when I try doing that with this markup
<Infragistics:NodeLayout Key="Fields" TargetTypeName="FieldMetaData" DisplayMemberPath="Values.FieldName"/>
I get this error in my debug output when trying to expand its parent node, to see this exact node layout -
"Unable to cast object of type 'System.Collection.Generic.KeyValuePair`2[FieldMetaData]' to type 'System.String'.
I tried many other tricks and variation that unfortunately didn't work. Also, apparently TargetTypeName does nothing in this case since I guess it doesn't recognize the values as "FieldMetaData" type, so only "Keys" actually works.
So I wonder if XamDataTree even supports dictionaries, or if there's anyway to make it work because all I actually need is to bind to the list of Dictionary values.
In Microsoft's regular TreeView It worked, so it will be a bit disappointing if I couldn't make this work with XamDataTree.
Thanks!
Dror.
The XamDataTree's DataManager currently cannot handle what you are trying to do, but we believe we can make a modification to get this to work.
I am going to ask that you submit a small sample showing your setup, so that I can validate the fix prior to release.
I will have our Developer Support staff open up a case so that you can be notified when the issue is resolved.