Hi,
I am unable to bind to a dictionary that is a child collection. Here are my classes
ParentClass
{
string Name,
Dictionary<MyEnum, ChildClass> ChildClasses
}
The Grid Datasource is a List<ParentClass>.
I am trying to bind using Unbound fields using the following:
<igDP:UnboundField Name="Name" BindingPath="Name > </igDP:UnboundField>
<igDP:UnboundField Name="ChildProperty" BindingPath="ChildClasses[MyEnum.Val].Property1" > </igDP:UnboundField>
But it does not seem to display anything.
Thanks in Advance,
Sandy
Hello Sandy,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want using similar data as yours. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
Hi Stefan,
Thanks for getting back to me. However, I am trying to show the Enums as Column.
From the Example, here is what I would like to show
Name Enum1 Enum2
Parent1 11 12
Parent2 10 20
I got it working by using the following (I will try it in my project next - Not sure if it's going to be problem as Enum is defined in a different namespace.)
<igDP:UnboundField BindingPath="ChildClasses[ENUM1].Value.Age"/>
It seems the error I was making was I was using Enum with it's name as in following:
<igDP:UnboundField BindingPath="ChildClasses[MyEnum.ENUM1].Value.Age"/>
Thanks.
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.