Back to Devexpress

LookUpEditBase.CascadingOwner Property

windowsforms-devexpress-dot-xtraeditors-dot-lookupeditbase-c4d57b4c.md

latest4.3 KB
Original Source

LookUpEditBase.CascadingOwner Property

Gets or sets the lookup editor whose value determines the filter criteria applied to the popup data source of the current lookup editor.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(null)]
public LookUpEditBase CascadingOwner { get; set; }
vb
<DefaultValue(Nothing)>
Public Property CascadingOwner As LookUpEditBase

Property Value

TypeDefaultDescription
LookUpEditBasenull

The lookup editor whose value determines the filter criteria applied to the popup data source of the current lookup editor.

|

Remarks

The CascadingOwner property (and optionally, the RepositoryItemLookUpEditBase.CascadingMember property) is used to perform filtering of the current lookup editor’s popup data source based on a value of another lookup editor. Note that these properties are only supported for standalone lookup editors.

See Cascading Lookups to learn more.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CascadingOwner 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-cascading-standalone-lookups/CS/Lookup-Cascading/Form1.cs#L43

csharp
lookUpEdit2.Properties.DisplayMember = "ProductName";
lookUpEdit2.CascadingOwner = lookUpEdit1;
// The following line is not required, as lookUpEdit2 automatically identifies a foreign key ("CategoryID") in its data source

winforms-cascading-lookups/CS/DXApplication1/Main.cs#L21

csharp
lookup.Properties.DisplayMember = displayMember;
    lookup.CascadingOwner = lookupOwner;
}

winforms-cascading-standalone-lookups/VB/Lookup-Cascading/Form1.vb#L45

vb
lookUpEdit2.Properties.DisplayMember = "ProductName"
lookUpEdit2.CascadingOwner = lookUpEdit1
' The following line is not required, as lookUpEdit2 automatically identifies a foreign key ("CategoryID") in its data source

winforms-cascading-lookups/VB/DXApplication1/Main.vb#L23

vb
lookup.Properties.DisplayMember = displayMember
    lookup.CascadingOwner = lookupOwner
End Sub

See Also

CascadingMember

PopupFilter

Cascading Lookups

LookUpEditBase Class

LookUpEditBase Members

DevExpress.XtraEditors Namespace