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.

ASPxDiagram.EdgeDataBound Event

Occurs after an edge has been bound to a data source.

Namespace: DevExpress.Web.ASPxDiagram

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

Declaration

public event DiagramEdgeEventHandler EdgeDataBound
Public Event EdgeDataBound As DiagramEdgeEventHandler

Event Data

The EdgeDataBound event's data class is DiagramEdgeEventArgs. The following properties provide information specific to this event:

Property Description
Edge Gets an edge object related to the event.

Remarks

The EdgeDataBound event is raised for each diagram edge after it has been bound to a data source. This event enables you to customize settings of the edge before it is finally rendered. You can access the processed edge via the Edge property of the event's argument.

NOTE

The EdgeDataBound event fires when the ASPxDiagram control is bound to an edge data source via the EdgeDataSourceID or EdgeDataSource property.

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px"
    NodeDataSourceID="FlowNodeDemoDataSource" EdgeDataSourceID="FlowEdgeDemoDataSource"
    OnEdgeDataBound="Diagram_EdgeDataBound">
    <Mappings>
        <Node Key="ID" Type="Type" Width="Width" Height="Height" />
        <Edge Key="ID" FromKey="FromID" ToKey="ToID" Text="Text" />
    </Mappings>
</dx:ASPxDiagram>
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