I just tried it, and it doesn't seem to work because the type of the collection is IList and that interface itself doesn't have a Count property (it is inherited via ICollection). Maybe with some extra binding flags it's possible to reach the Count property.
Also changing the IList to an ArrayList might do the trick.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Is it possible to add properties of the child object collections to the parent object view?
something like this:
class Parent { private IList childs; }
view = new ObjectView(typeof(Parent));
view.AddColumn("Childs.Count", "Number of Childs");
--Gena
I just tried it, and it doesn't seem to work because the type of the collection is IList and that interface itself doesn't have a Count property (it is inherited via ICollection). Maybe with some extra binding flags it's possible to reach the Count property.
Also changing the IList to an ArrayList might do the trick.
Hmm, that should work. I've used inherited properties before. I'll make an issue in jira for it.