The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

ModelEditorGroupingHelper.RegisterNodeGroupPathDelegate(Type, Func<IModelNode, String[]>) Method

Registers the method used to calculate the Application Model node's group path in the Model Editor's Nodes Tree.

Namespace: DevExpress.ExpressApp.ModelEditor

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public void RegisterNodeGroupPathDelegate(
    Type collectionNodeType,
    Func<IModelNode, string[]> GetNodeGroupPathDelegate
)
Public Sub RegisterNodeGroupPathDelegate(
    collectionNodeType As Type,
    GetNodeGroupPathDelegate As Func(Of IModelNode, String())
)
public void RegisterNodeGroupPathDelegate(
    Type collectionNodeType,
    Func<IModelNode, string[]> GetNodeGroupPathDelegate
)
Public Sub RegisterNodeGroupPathDelegate(
    collectionNodeType As Type,
    GetNodeGroupPathDelegate As Func(Of IModelNode, String())
)
public void RegisterNodeGroupPathDelegate(
    Type collectionNodeType,
    Func<IModelNode, string[]> GetNodeGroupPathDelegate
)
Public Sub RegisterNodeGroupPathDelegate(
    collectionNodeType As Type,
    GetNodeGroupPathDelegate As Func(Of IModelNode, String())
)

Parameters

Name Type Description
collectionNodeType Type

A Type object specifying the type of the Application Model node.

GetNodeGroupPathDelegate Func<IModelNode, String[]>

A delegate used to calculate the Application Model node's group path.

Parameters

Name Type Description
collectionNodeType Type

A Type object specifying the type of the Application Model node.

GetNodeGroupPathDelegate Func<IModelNode, String[]>

A delegate used to calculate the Application Model node's group path.

Parameters

Name Type Description
collectionNodeType Type

A Type object specifying the type of the Application Model node.

GetNodeGroupPathDelegate Func<IModelNode, String[]>

A delegate used to calculate the Application Model node's group path.

Remarks

You can call the RegisterNodeGroupPathDelegate method in the platform-agnostic module's constructor.

using DevExpress.ExpressApp.ModelEditor;
// ...
public sealed partial class MySolutionModule : ModuleBase {
    public MySolutionModule () {
        InitializeComponent();
        ModelEditorGroupingHelper.Instance.AllowSplitByGroupLevels = true;
        ModelEditorGroupingHelper.Instance.RegisterNodeGroupPathDelegate(
            typeof(IModelViews), node => CusomGroupPathCalculator(node));
    }
    public string[] CusomGroupPathCalculator(IModelNode node) {
        // ...
    }
    // ...
}

You can use the ModelEditorGroupingHelper.SplitGroupPath helper method in your custom delegate to calculate the group path.

The ModelEditorGroupingHelper provides two built-in delegates that can be passed to the RegisterNodeGroupPathDelegate method:

See Also