Reputation: 21
I have used the Xceed Property Grid. I have used the Collection Editor from Xceed for Collections in this Property Grid.
[Editor(typeof(CustomCollectionEditor), typeof(CustomCollectionEditor))]
[Serializable]
public class Variable
{
//Properties in Class
}
Here the Custom Collection Editor has been derived from Xceed Collection Editor. But nothing has been overwritten. It is just a wrapper class.
The Xceed Website tells the following process to Expand: "The PropertyGrid supports this scenario and allows you to drill down into a property’s heirarchy. To enable this behavior you must decorate your property with the ExpandableObject attribute"
So I have Used it in my Property as:
[ExpandableObject]
public List<Variable> GlobalVariableList
{
get { return _varlist; }
set { _varlist = value; }
}
But only the Count of the Properties are displayed in Expanding this. And not the Property Name and Value.
Upvotes: 2
Views: 749
Reputation: 2418
I think your customcollectioneditor needs to be on the collection not the item.
Upvotes: 0