All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DiagramNodeMappingInfo.ParentKey Property

Specifies the name of a data source field that provides a parent node key for a node.

Namespace: DevExpress.Web.ASPxDiagram

Assembly: DevExpress.Web.ASPxDiagram.v20.1.dll

Declaration

[DefaultValue("")]
public string ParentKey { get; set; }
<DefaultValue("")>
Public Property ParentKey As String

Property Value

Type Default Description
String

String.Empty

The field name.

Remarks

Specify the ParentKey property if your diagram has tree-like structure, and nodes are connected by Id - Parent Id relation. For more information, review the following topic: Self-Referenced Data Structure

TIP

Use the ParentKey property to change the parent of a node after it is bound to a data source (in the NodeDataBound event).

Online Demo

Diagram - Data Binding

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px" NodeDataSourceID="DepartmentDemoDataSource" >
    <Mappings>
        <Node Key="ID" Text="DepartmentName" ParentKey="ParentID" />
    </Mappings>
</dx:ASPxDiagram>
See Also