Here is an example:
PropertyDescriptor descriptor= TypeDescriptor.GetProperties(this.GetType())["DataType"]; BrowsableAttribute attrib= (BrowsableAttribute)descriptor.Attributes[typeof(BrowsableAttribute)]; FieldInfo isBrow = attrib.GetType().GetField("browsable",BindingFlags.NonPublic | BindingFlags.Instance); isBrow.SetValue(attrib,false);
Just replace the DataType with your property name. Note that all properties must have a mutable attribute (in this case, Browsable). If one of the properties does not have an attribute, all the class properties gets a new attribute.
Code taken from here: Exploring the behavior of a property grid .
Neolisk
source share