Skip to main content

DiagramNodeEventArgs.Node Property

Gets a node object related to the event.

Namespace: DevExpress.Web.ASPxDiagram

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

NuGet Package: DevExpress.Web


public DiagramNode Node { get; protected set; }

Property Value

Type Description

An object that is the processed node.


<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px"
    NodeDataSourceID="DepartmentDemoDataSource" OnNodeDataBound="Diagram_NodeDataBound" >
        <Node Key="ID" ParentKey="ParentID" Text="DepartmentName" />
            <dx:DiagramToolboxGroup CustomCategoryName="Departments" DisplayMode="Texts" />
protected void Page_Load(object sender, EventArgs e) {
    if(!IsPostBack) {
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