PropertyGridControl.BrowsableAttributes Property

Gets or sets the collection of browsable attributes.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll


public AttributeCollection BrowsableAttributes { get; set; }
Public Property BrowsableAttributes As AttributeCollection

Property Value

Type Description

A AttributeCollection object that represents the collection of browsable attributes.


The PropertyGridControl only displays the properties marked with attributes from the BrowsableAttributes collection. The BrowsableAttributes collection initially contains one attribute - System.ComponentModel.BrowsableAttribute.Yes. You can add other attributes to this collection if necessary.

By default, the control is not refreshed after you change the BrowsableAttributes property. To automatically refresh the control, set the PropertyGridControl.AutoGenerateRows property to true. To refresh the control manually, call the PropertyGridControl.RetrieveFields method.


The following code shows how to display non-browsable properties in the PropertyGridControl.

propertyGridControl1.SelectedObject = this;
propertyGridControl1.BrowsableAttributes = new AttributeCollection(new Attribute[] { BrowsableAttribute.No });


In the following example, the PropertyGrid control will display the properties marked with the DesignerSerializationVisibilityAttribute.Content attribute.

using System.ComponentModel;

Attribute[] attr = new Attribute[] { DesignerSerializationVisibilityAttribute.Content };
propertyGridControl1.BrowsableAttributes = new AttributeCollection(attr);
See Also