This example demonstrates how to implement cascading lookups. When a user selects a category in the first lookup, the second lookup filters its items to display only products that match the selected category.
Use the secondary lookup’s CascadingOwner property to specify the primary lookup. Lookups use an internal algorithm that identifies a key field in a data source. The algorithm checks the names of data objects, the key attributes, and the data type of the primary keys. The algorithm is based on a common naming convention of key fields (for example, ID
, Key
, and OID
).
lookUpEdit2.CascadingOwner = lookUpEdit1;
Note
The
CascadingOwner
property is supported only for standalone lookup editors. Read the following help topic for information on how to create cascading in-place lookups: Cascading Lookups.
(you will be redirected to DevExpress.com to submit your response)