Property grid only show some category
-
22-08-2019 - |
Question
I got a PropertyGrid that is use on an object that have the following property category : Style, Calcul and Misc
What I want is to only show to the user the Calcul category, but I don't want to use the browsable attribute because I want all these property to be visible in Visual studio.
So, what I need, is an in-code solution.
I use .Net 3.5 c#
Solution
PropertyGrid
has a property - BrowsableAttributes
; assign this your categories:
propGrid.BrowsableAttributes = new AttributeCollection(
new CategoryAttribute("Calcul"));
And (hopefully) it should work.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow