.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

ModelEditorGroupingHelper Class

Provides helper methods and properties used to replace or customize the default grouping mechanism in the Model Editor's Nodes Tree.

Namespace: DevExpress.ExpressApp.ModelEditor

Assembly: DevExpress.ExpressApp.v19.2.dll


public class ModelEditorGroupingHelper
Public Class ModelEditorGroupingHelper


To customize the Model Editor nodes grouping, access the ModelEditorGroupingHelper instance using the ModelEditorGroupingHelper.Instance property. Place your code in the platform-agnostic module's constructor. For instance, the following code groups the child nodes of the IModelValidationRules node. The parent node type is passed to the ModelEditorGroupingHelper.RegisterNodeGroupPathDelegate method.

using DevExpress.ExpressApp; 
using DevExpress.ExpressApp.Model; 
using DevExpress.ExpressApp.ModelEditor; 
using DevExpress.ExpressApp.Validation;
// ...
public sealed partial class MainDemoModule : ModuleBase {
    public MainDemoModule() {
        typeof(IModelValidationRules), node => ValidationGroupPathCalculator("TargetType.Name", node));
    public string[] ValidationGroupPathCalculator(string propertyName, IModelNode modelNode) {
        string groupName = "";
        object propertyValue = ModelEditorGroupingHelper.Instance.GetPropertyValue(propertyName, modelNode);
        if (propertyValue != null) {
            groupName = propertyValue.ToString();
        return ModelEditorGroupingHelper.Instance.SplitGroupPath(groupName, modelNode);
    // ...

As the result, the child nodes of the Validation | Rules node are grouped as follows:



Do not access ModelEditorGroupingHelper from multiple modules in the solution to avoid design-time issues in the Model Editor.


See Also