Skip to main content

DiagramEdge Class

A diagram edge.

Namespace: DevExpress.Web.ASPxDiagram

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


public class DiagramEdge :

The following members accept/return DiagramEdge objects:


When the ASPxDiagram control is bound to an edge data source (EdgeDataSource), the control creates a DiagramEdge object and raises the EdgeDataBound event for every data item in the source.

You can access the processed DiagramEdge object via the event argument’s Edge property. Use the object’s properties to customize the edge before it is finally rendered.

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px"
    NodeDataSourceID="FlowNodeDemoDataSource" EdgeDataSourceID="FlowEdgeDemoDataSource"
        <Node Key="ID" Type="Type" Width="Width" Height="Height" />
        <Edge Key="ID" FromKey="FromID" ToKey="ToID" Text="Text" />
protected void Diagram_EdgeDataBound(object sender, DevExpress.Web.ASPxDiagram.DiagramEdgeEventArgs e) {
    if (e.Edge.Text == "No") {
        e.Edge.Style = "stroke: red";
        e.Edge.TextStyle = "fill: red";

    if (e.Edge.Text == "Yes") {
        e.Edge.Style = "stroke: green";
        e.Edge.TextStyle = "fill: green";



See Also