All docs
V20.2
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
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.

DiagramNodeEventArgs.Node Property

Gets a node object related to the event.

Namespace: DevExpress.Web.ASPxDiagram

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

Declaration

public DiagramNode Node { get; protected set; }
Public Property Node As DiagramNode

Property Value

Type Description
DiagramNode

An object that is the processed node.

Remarks

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px"
    NodeDataSourceID="DepartmentDemoDataSource" OnNodeDataBound="Diagram_NodeDataBound" >
    <Mappings>
        <Node Key="ID" ParentKey="ParentID" Text="DepartmentName" />
    </Mappings>
    <SettingsToolbox>
        <Groups>
            <dx:DiagramToolboxGroup CustomCategoryName="Departments" DisplayMode="Texts" />
        </Groups>
    </SettingsToolbox>
</dx:ASPxDiagram>
protected void Page_Load(object sender, EventArgs e) {
    if(!IsPostBack) {
        Diagram.CustomShapes.AddRange(GetDepartmentShapes());
    }
}
static IEnumerable<DiagramCustomShape> GetDepartmentShapes() {
    return DepartmentDataProvider.GetDepartments().Select(d =>
        new DiagramCustomShape {
            Category = "Departments",
            DefaultText = d.DepartmentName,
            Type = "dep" + d.ID,
            BaseType = DiagramShapeType.Rectangle,
        }
    );
}
protected void Diagram_NodeDataBound(object sender, DiagramNodeEventArgs e) {
    e.Node.Type = "dep" + e.Node.Key;
}
See Also