Reputation: 655
In C#, I have a class set up like so:
class Page
{
public class Element
{
private string test;
public string Test
{ get { return test; } set { test = value; } }
}
private Element element;
public Element PrimaryElement
{ get { return element; } set { element = value; } }
}
If I have a PropertyGrid where the select object is an instance of Page, how can I modify Test in its member PrimaryElement from the PropertyGrid? It shows up in grey and is not expandable nor editable.
Upvotes: 1
Views: 167
Reputation: 4745
Add this to your Element type or to your PrimaryElement property:
[TypeConverter(typeof(ExpandableObjectConverter))]
Upvotes: 1