windowsforms-devexpress-dot-xtraverticalgrid-dot-events-dot-custompropertydescriptorseventargs-5e2d67fb.md
Gets the object whose properties must be retrieved via the event.
Namespace : DevExpress.XtraVerticalGrid.Events
Assembly : DevExpress.XtraVerticalGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid
public object Source { get; }
Public ReadOnly Property Source As Object
| Type | Description |
|---|---|
| Object |
An object whose properties must be retrieved via the event.
|
First, the PropertyGridControl.CustomPropertyDescriptors event fires to retrieve root properties for the selected object. The Source member will identify this selected object.
Then, when expanding a property that contains nested properties, the event fires again, to retrieve these nested properties. The Source member will identify the object representing the parent property.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Source property.
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#L29
{
if ((sender as PropertyGridControl).SelectedObject == e.Source)
{
winforms-property-grid-unbound-rows/VB/DXApplication3/CustomDescriptor/UnboundRowHelper.vb#L22
Private Sub _PropertyGrid_CustomPropertyDescriptors(ByVal sender As Object, ByVal e As CustomPropertyDescriptorsEventArgs)
If TryCast(sender, PropertyGridControl).SelectedObject Is e.Source Then
Dim properties As PropertyDescriptorCollection = e.Properties
See Also
CustomPropertyDescriptorsEventArgs Class