Collection Properties
- 2 minutes to read
XAF applications display collection properties in nested List Views. Different collection properties have different Actions in a UI.
- ASP.NET Core Blazor
- Windows Forms
- ASP.NET Web Forms
Refer to the following topics for information on relationships between entities in code and UI:
- Relationships Between Persistent Objects in Code and UI (XPO)
- Relationships Between Entities in Code and UI (EF Core)
Note
Refer to the Property Editors | Collection Properties section in the Feature Center demo installed with XAF to see Collection Property Editors in action. The default location of the application is %PUBLIC%\Documents\DevExpress Demos 24.
#Examples
- Collection Properties in XPO
- Collection Properties in EF Core
- XAF - How to display a collection property as a checked list box
- XAF Blazor - How to use a TagBox to view and edit a collection property in Detail Views
#Property Editors for Collection Properties
XAF applications use the UI-independent ListPropertyEditor. It creates a Template and Frame that contains a List View. This List View uses the ListView.CollectionSource of the PropertyCollectionSource type. For more information on Templates, Frames, and Views, refer to the UI Element Overview topic.
In the Model Editor, set the IModelMemberViewItem.View property to a custom List View to use this View instead of the default one. You can also manage the New, Delete, Link, or Unlink Action’s visibility in the Model Editor. Set the List View’s AllowNew, AllowDelete, AllowLink, or AllowUnlink property to false to hide these Actions.