This example demonstrates how to create a custom attribute and remove a property from the Application Model's DetailView.Items
and ListView.Columns
nodes.
In this case, the properties marked with this attribute are removed from views.
To implement this functionality, the IModelMember
interface is extended with the IRemovedFromViewInfo
interface that contains the IsRemovedFromViewInfo
property. The value of this property is calculated based on the value of the custom attribute we created (RemoveFromViewInfoAttribute
) and applied to the persistent class via the domain logic (RemovedFromViewInfoLogic
). The IRemovedFromViewInfo.IsRemovedFromViewInfo
property is used by the model node generator updater (ViewsNodesGeneratorUpdater
) to remove certain view items and columns from detail and list views.
This example demonstrates three techniques: how to extend the application model with additional properties, define default model values via domain logic, and modify the default model via the model node generator updater.
- Create Additional ListView Nodes in Code Using a Generator Updater
- Add Custom Nodes and Properties to the Application Model in Code
(you will be redirected to DevExpress.com to submit your response)