Is it only possible to add categories to the .NET PropertyGrid by annotating my data class with attributes like CategoryAttribute?
Is it only possible to add categories to the .NET PropertyGrid by annotating my
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Doing this with ICustomTypeDescriptor and your own PropertyDescriptor class is quite easy and does not involve so much code.
This article Customized display of collection data in a PropertyGrid describes how to do this in detail. For adding categories you would also need to override the Category property in your PropertyDescriptor class.