Hi!
Thanks for asking! I'm a member of the ASP.NET team, and was just popping over here to see what was going on. The best place to ask ASP.NET questions is over on the ASP.NET forums at
http://www.asp.net/welcome.aspx?tabindex=1&tabid=39One way you could do that is put the properties that you want to categorize into their own class, thus providing myClass.subClass.property = "hello";
HTH,
PEte
[Category("Layout")]
public Point Location
{
get { return m_Location; }
}
If you plan to use separate classes to bundle properties, use the ExpandableObjectConverter attribute on the class in order to be able to open a sub-item in the propertygrid.
Hope this helps
Does that make any sense?
Let's assume you set the SelectedObject of your propertygrid to some instance of object Foo, which has a property of type Bar. In this example the propertygrid will display a property Bar, in the category "SomeCategory", and you can open it up because the class has the ExpandableObjectConverter applied to it.
[TypeConverterAttribute( typeof( ExpandableObjectConverter ) )] public class Bar { public string Name { get { return m_Name; } set { m_Name = value; } } public int SomeValue public class Foo |
I would further suggest browsing for ExpandableObjectConverter and TypeConverter in the docs and on google, there are lots of articles on the subject.
Does this answer your question?