ModelNodesGeneratorBase Class
The base class for Nodes Generators.
Namespace: DevExpress.ExpressApp.Model
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Remarks
To define how the custom Application Model node is generated, inherit this class and override the GenerateNodesCore method. To access the node for which the generator is invoked, use the method’s node parameter. To apply the implemented Generator to the required node, decorate the model node interface with the ModelNodesGeneratorAttribute attribute, and pass the Nodes Generator type as the parameter. The code example is provided in the Extend and Customize the Application Model in Code.
If you cannot modify the Nodes Generator code (for instance, if it is one of the built-in Nodes Generators), you still can customize the generated node content in code. Implement a Generator Updater by inheriting the ModelNodesGeneratorUpdater<T> class. The complete example of implementing Generator Updaters for this Nodes Generator is provided in the How to: Create Additional ListView Nodes in Code using a Generator Updater topic.
Important
Always use a Node Generator or Generator Updater to customize the current node and its child nodes. To update nodes outside the current node hierarchy, create separate Node Generators or Generator Updaters.