expressappframework-devexpress-dot-expressapp-dot-propertycollectionsource-e9593e60.md
Provides access to the object that contains a collection property represented by the current PropertyCollectionSource.
Namespace : DevExpress.ExpressApp
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public object MasterObject { get; set; }
Public Property MasterObject As Object
| Type | Description |
|---|---|
| Object |
An object that contains a collection property represented by the current PropertyCollectionSource.
|
When an object contains a collection property, this property is displayed in a Detail View via a nested List View. If a Detail View’s DetailView.CurrentObject has not been assigned, the MasterObject property of the nested List View’s Collection Source may return null.
To track changes of the MasterObject, subscribe to the PropertyCollectionSource.MasterObjectChanged event.
To see an example of accessing this property, refer to the How to: Access the Master Object from a Nested List View help topic.
The following code snippets (auto-collected from DevExpress Examples) contain references to the MasterObject 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.
if(linkUnlinkController != null) {
linkUnlinkController.Active["NotInProductView"] = !(pcs != null && (pcs.MasterObject is ProductView));
}
PropertyCollectionSource pcs = targetListView.CollectionSource as PropertyCollectionSource;
object masterObject = pcs != null ? nestedImportObjectSpace.GetObjectByKey(pcs.MasterObjectType, nestedImportObjectSpace.GetKeyValue(pcs.MasterObject)) : null;
importDataDelegate(nestedImportObjectSpace, masterObject);
See Also
PropertyCollectionSource Class