Back to Devexpress

PropertyGridControl.CustomPropertyDescriptors Event

windowsforms-devexpress-dot-xtraverticalgrid-dot-propertygridcontrol-b972396f.md

latest5.3 KB
Original Source

PropertyGridControl.CustomPropertyDescriptors Event

Allows you to specify properties that should be displayed in the control. You can use this event to filter or sort properties, display rows that are not bound to the selected object’s properties, or display multiple objects’ properties.

Namespace : DevExpress.XtraVerticalGrid

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

Declaration

csharp
public event CustomPropertyDescriptorsEventHandler CustomPropertyDescriptors
vb
Public Event CustomPropertyDescriptors As CustomPropertyDescriptorsEventHandler

Event Data

The CustomPropertyDescriptors event's data class is CustomPropertyDescriptorsEventArgs. The following properties provide information specific to this event:

PropertyDescription
AttributesGets an array of the default browsable attributes used by the Property Grid Control to retrieve properties from the selected object(s).
ContextGets contextual information on a property.
PropertiesGets or sets the collection of PropertyDescriptor objects that identify properties to be displayed in the control.
SourceGets the object whose properties must be retrieved via the event.

Remarks

The CustomPropertyDescriptors event fires when a property is about to be displayed at the root or nested level. Use the event’s Properties parameter to specify a collection of PropertyDescriptor objects that specify properties to be displayed in the control. You can update the existing collection or assign a new one.

See the following help topics for examples:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomPropertyDescriptors event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-property-grid-unbound-rows/CS/DXApplication3/CustomDescriptor/UnboundRowHelper.cs#L24

csharp
_PropertyGrid = pg;
    _PropertyGrid.CustomPropertyDescriptors += _PropertyGrid_CustomPropertyDescriptors;
}

winforms-property-grid-unbound-rows/VB/DXApplication3/CustomDescriptor/UnboundRowHelper.vb#L18

vb
_PropertyGrid = pg
    AddHandler _PropertyGrid.CustomPropertyDescriptors, AddressOf _PropertyGrid_CustomPropertyDescriptors
End Sub

See Also

How to: Edit Multiple Objects

How to: Filter Properties

How to: Sort Properties

PropertyGridControl Class

PropertyGridControl Members

DevExpress.XtraVerticalGrid Namespace